public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Kulikov Vasiliy <segooon@gmail.com>
Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 06/10 v2] ALSA: msnd: check request_region() return value
Date: Thu, 29 Jul 2010 12:02:13 +0000	[thread overview]
Message-ID: <s5hocdqsdh6.wl%tiwai@suse.de> (raw)
In-Reply-To: <1280400325-9405-1-git-send-email-segooon@gmail.com>

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@gmail.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
> 

      reply	other threads:[~2010-07-29 12:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 10:45 [PATCH 06/10 v2] ALSA: msnd: check request_region() return value Kulikov Vasiliy
2010-07-29 12:02 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hocdqsdh6.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=segooon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox