diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-07-29 06:45:50 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-07-29 07:48:57 -0400 |
commit | 9c29490246ed80975ab8b87bcd4ebe5b87c1c1d6 (patch) | |
tree | bd20d40cc243649252a8afe6a749804f1960985c /sound/oss/msnd_pinnacle.c | |
parent | fa95a6471ffaa6f40d71f44fc4d4636ee17280f5 (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/msnd_pinnacle.c')
-rw-r--r-- | sound/oss/msnd_pinnacle.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c index bfaac5fa13d7..2e48b17667d0 100644 --- a/sound/oss/msnd_pinnacle.c +++ b/sound/oss/msnd_pinnacle.c | |||
@@ -1400,9 +1400,13 @@ static int __init attach_multisound(void) | |||
1400 | printk(KERN_ERR LOGNAME ": Couldn't grab IRQ %d\n", dev.irq); | 1400 | printk(KERN_ERR LOGNAME ": Couldn't grab IRQ %d\n", dev.irq); |
1401 | return err; | 1401 | return err; |
1402 | } | 1402 | } |
1403 | request_region(dev.io, dev.numio, dev.name); | 1403 | if (request_region(dev.io, dev.numio, dev.name) == NULL) { |
1404 | free_irq(dev.irq, &dev); | ||
1405 | return -EBUSY; | ||
1406 | } | ||
1404 | 1407 | ||
1405 | if ((err = dsp_full_reset()) < 0) { | 1408 | err = dsp_full_reset(); |
1409 | if (err < 0) { | ||
1406 | release_region(dev.io, dev.numio); | 1410 | release_region(dev.io, dev.numio); |
1407 | free_irq(dev.irq, &dev); | 1411 | free_irq(dev.irq, &dev); |
1408 | return err; | 1412 | return err; |