lkml.org 
[lkml]   [2020]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] ALSA: line6: add hw monitor volume control for POD HD500
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

\
 
 \ /
  Last update: 2020-07-13 08:45    [W:0.087 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site