[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <s5hocdqsdh6.wl%tiwai@suse.de>
Date: Thu, 29 Jul 2010 14:02:13 +0200
From: Takashi Iwai <tiwai@...e.de>
To: Kulikov Vasiliy <segooon@...il.com>
Cc: kernel-janitors@...r.kernel.org, Jaroslav Kysela <perex@...ex.cz>,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/10 v2] ALSA: msnd: check request_region() return value
At Thu, 29 Jul 2010 14:45:24 +0400,
Kulikov Vasiliy wrote:
>
> request_region() may fail, if so return -EBUSY.
>
> Signed-off-by: Kulikov Vasiliy <segooon@...il.com>
Thanks, applied both patches now.
Takashi
> ---
> sound/isa/msnd/msnd_pinnacle.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/sound/isa/msnd/msnd_pinnacle.c b/sound/isa/msnd/msnd_pinnacle.c
> index 60b6abd..ed42f8e 100644
> --- a/sound/isa/msnd/msnd_pinnacle.c
> +++ b/sound/isa/msnd/msnd_pinnacle.c
> @@ -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
> --
> 1.7.0.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists