13 Jul
2020
13 Jul
'20
8:44 a.m.
On Mon, 13 Jul 2020 07:46:35 +0200, Vasily Khoruzhick wrote:
Add hw monitor volume control for POD HD500. The same change may work for HD500X but I don't have it to test.
Signed-off-by: Vasily Khoruzhick anarsoul@gmail.com
v3: - use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL - use GFP_KERNEL instead of GFP_ATOMIC for allocating a message - use lower case for float lookup table v2: clamp volume value to [0, ARRAY_SIZE() -1] in podhd_set_monitor_level()
Almost good, but just a minor issue below:
+static void podhd_set_monitor_level(struct usb_line6_podhd *podhd, int value) +{
(snip)
- buf = kmalloc(sizeof(msg), GFP_KERNEL);
- memcpy(buf, msg, sizeof(msg));
Missing NULL check of buf.
Could you fix and resubmit?
Thanks!
Takashi