From: Wei Yongjun Date: Tue, 18 Jun 2013 13:09:42 +0000 (+0800) Subject: ALSA: firewire: fix error return code in scs_probe() X-Git-Tag: v3.11-rc1~23^2~7^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1389fd03b7ff72625cdae5cc3f838ce093661200;p=platform%2Fkernel%2Flinux-stable.git 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 Acked-by: Clemens Ladisch Signed-off-by: Takashi Iwai --- diff --git a/sound/firewire/scs1x.c b/sound/firewire/scs1x.c index 844a555..b252c21 100644 --- a/sound/firewire/scs1x.c +++ b/sound/firewire/scs1x.c @@ -405,8 +405,10 @@ static int scs_probe(struct device *unit_dev) scs->output_idle = true; scs->buffer = kmalloc(HSS1394_MAX_PACKET_SIZE, GFP_KERNEL); - if (!scs->buffer) + if (!scs->buffer) { + err = -ENOMEM; goto err_card; + } scs->hss_handler.length = HSS1394_MAX_PACKET_SIZE; scs->hss_handler.address_callback = handle_hss;