mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-18 06:15:12 +00:00
ALSA: firewire: fix error return code in scs_probe()
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@trendmicro.com.cn> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
53b434f093
commit
1389fd03b7
@ -405,8 +405,10 @@ static int scs_probe(struct device *unit_dev)
|
|||||||
scs->output_idle = true;
|
scs->output_idle = true;
|
||||||
|
|
||||||
scs->buffer = kmalloc(HSS1394_MAX_PACKET_SIZE, GFP_KERNEL);
|
scs->buffer = kmalloc(HSS1394_MAX_PACKET_SIZE, GFP_KERNEL);
|
||||||
if (!scs->buffer)
|
if (!scs->buffer) {
|
||||||
|
err = -ENOMEM;
|
||||||
goto err_card;
|
goto err_card;
|
||||||
|
}
|
||||||
|
|
||||||
scs->hss_handler.length = HSS1394_MAX_PACKET_SIZE;
|
scs->hss_handler.length = HSS1394_MAX_PACKET_SIZE;
|
||||||
scs->hss_handler.address_callback = handle_hss;
|
scs->hss_handler.address_callback = handle_hss;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user