[PATCH v3] ALSA: line6: add hw monitor volume control for POD HD500

Takashi Iwai tiwai at suse.de
Mon Jul 13 08:44:16 CEST 2020


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 at 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


More information about the Alsa-devel mailing list