aboutsummaryrefslogtreecommitdiff
path: root/sound/oss
diff options
context:
space:
mode:
authorKulikov Vasiliy <segooon@gmail.com>2010-07-29 14:45:50 +0400
committerTakashi Iwai <tiwai@suse.de>2010-07-29 13:48:57 +0200
commit9c29490246ed80975ab8b87bcd4ebe5b87c1c1d6 (patch)
treebd20d40cc243649252a8afe6a749804f1960985c /sound/oss
parentfa95a6471ffaa6f40d71f44fc4d4636ee17280f5 (diff)
sound: oss: msnd: check request_region() return value
request_region() may fail, if so return -EBUSY. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/oss')
-rw-r--r--sound/oss/msnd_pinnacle.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c
index bfaac5fa13d..2e48b17667d 100644
--- a/sound/oss/msnd_pinnacle.c
+++ b/sound/oss/msnd_pinnacle.c
@@ -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;