提交 1389fd03 编写于 作者: W Wei Yongjun 提交者: Takashi Iwai

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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: NClemens Ladisch <clemens@ladisch.de>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 53b434f0
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册