提交 fa95a647 编写于 作者: K Kulikov Vasiliy 提交者: Takashi Iwai

ALSA: msnd: check request_region() return value

request_region() may fail, if so return -EBUSY.
Signed-off-by: NKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 ec9d04b2
无相关合并请求
......@@ -549,7 +549,10 @@ static int __devinit snd_msnd_attach(struct snd_card *card)
printk(KERN_ERR LOGNAME ": Couldn't grab IRQ %d\n", chip->irq);
return err;
}
request_region(chip->io, DSP_NUMIO, card->shortname);
if (request_region(chip->io, DSP_NUMIO, card->shortname) == NULL) {
free_irq(chip->irq, chip);
return -EBUSY;
}
if (!request_mem_region(chip->base, BUFFSIZE, card->shortname)) {
printk(KERN_ERR LOGNAME
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部