Commit 9c294902 authored by Kulikov Vasiliy's avatar Kulikov Vasiliy Committed by Takashi Iwai

sound: oss: msnd: check request_region() return value

request_region() may fail, if so return -EBUSY.
Signed-off-by: default avatarKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent fa95a647
......@@ -1400,9 +1400,13 @@ static int __init attach_multisound(void)
printk(KERN_ERR LOGNAME ": Couldn't grab IRQ %d\n", dev.irq);
return err;
}
request_region(dev.io, dev.numio, dev.name);
if (request_region(dev.io, dev.numio, dev.name) == NULL) {
free_irq(dev.irq, &dev);
return -EBUSY;
}
if ((err = dsp_full_reset()) < 0) {
err = dsp_full_reset();
if (err < 0) {
release_region(dev.io, dev.numio);
free_irq(dev.irq, &dev);
return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment