diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-06-18 09:09:42 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-06-18 10:11:57 -0400 |
commit | 1389fd03b7ff72625cdae5cc3f838ce093661200 (patch) | |
tree | 1722dbf7ceb445504aa66e898fdf83a7222b433d /sound/firewire/scs1x.c | |
parent | 53b434f09340db8ad59b43789b7c43f54171fe36 (diff) |
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>
Diffstat (limited to 'sound/firewire/scs1x.c')
-rw-r--r-- | sound/firewire/scs1x.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/firewire/scs1x.c b/sound/firewire/scs1x.c index 844a555c3b1e..b252c21b6d13 100644 --- a/sound/firewire/scs1x.c +++ b/sound/firewire/scs1x.c | |||
@@ -405,8 +405,10 @@ static int scs_probe(struct device *unit_dev) | |||
405 | scs->output_idle = true; | 405 | scs->output_idle = true; |
406 | 406 | ||
407 | scs->buffer = kmalloc(HSS1394_MAX_PACKET_SIZE, GFP_KERNEL); | 407 | scs->buffer = kmalloc(HSS1394_MAX_PACKET_SIZE, GFP_KERNEL); |
408 | if (!scs->buffer) | 408 | if (!scs->buffer) { |
409 | err = -ENOMEM; | ||
409 | goto err_card; | 410 | goto err_card; |
411 | } | ||
410 | 412 | ||
411 | scs->hss_handler.length = HSS1394_MAX_PACKET_SIZE; | 413 | scs->hss_handler.length = HSS1394_MAX_PACKET_SIZE; |
412 | scs->hss_handler.address_callback = handle_hss; | 414 | scs->hss_handler.address_callback = handle_hss; |