[alsa-devel] [PATCH] ALSA: firewire: fix error return code in scs_probe()

Clemens Ladisch clemens at ladisch.de
Tue Jun 18 16:02:29 CEST 2013


Wei Yongjun wrote:
> Fix to return -ENOMEM in the kmalloc() error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>

Acked-by: Clemens Ladisch <clemens at ladisch.de>

>  	scs->buffer = kmalloc(HSS1394_MAX_PACKET_SIZE, GFP_KERNEL);
> -	if (!scs->buffer)
> +	if (!scs->buffer) {
> +		err = -ENOMEM;
>  		goto err_card;
> +	}


More information about the Alsa-devel mailing list