mirror of
https://github.com/torvalds/linux.git
synced 2024-12-30 14:52:05 +00:00
ALSA: 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>
This commit is contained in:
parent
ec9d04b2a8
commit
fa95a6471f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user