projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61eee4a
)
ALSA: line6: Use kmemdup in podhd_set_monitor_level()
author
YueHaibing
<yuehaibing@huawei.com>
Fri, 17 Jul 2020 08:17:10 +0000
(16:17 +0800)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 17 Jul 2020 08:57:44 +0000
(10:57 +0200)
Use kmemdup rather than duplicating its implementation.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link:
https://lore.kernel.org/r/20200717081710.39180-1-yuehaibing@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/line6/podhd.c
patch
|
blob
|
history
diff --git
a/sound/usb/line6/podhd.c
b/sound/usb/line6/podhd.c
index
1557483
..
eef45f7
100644
(file)
--- a/
sound/usb/line6/podhd.c
+++ b/
sound/usb/line6/podhd.c
@@
-293,12
+293,10
@@
static void podhd_set_monitor_level(struct usb_line6_podhd *podhd, int value)
};
unsigned char *buf;
- buf = km
alloc(
sizeof(msg), GFP_KERNEL);
+ buf = km
emdup(msg,
sizeof(msg), GFP_KERNEL);
if (!buf)
return;
- memcpy(buf, msg, sizeof(msg));
-
if (value < 0)
value = 0;