public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Kulikov Vasiliy <segooon@gmail.com>,
	kernel-janitors@vger.kernel.org,
	Andrew Veliath <andrewtv@usa.net>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	Arnd Bergmann <arnd@arndb.de>, Tejun Heo <tj@kernel.org>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 09/10] oss: msnd: check request_region() return value
Date: Wed, 28 Jul 2010 23:20:31 +0200	[thread overview]
Message-ID: <20100728212031.GQ26313@bicker> (raw)
In-Reply-To: <20100728200002.GP26313@bicker>

On Wed, Jul 28, 2010 at 10:00:02PM +0200, Dan Carpenter wrote:
> This should be -EBUSY as well.  The same for "[PATCH 06/10] ALSA: msnd: 
> check request_region() return value"
> 
> Another way to write that would be:
> 

Gar.  I was thinking of request_resource().  request_region() returns a
pointer of course.

But still the return code should probably be -EBUSY.  Resource
conflicts are more likely than allocation failures.

regards,
dan carpenter

> -	request_region(dev.io, dev.numio, dev.name);
> +	err = request_region(dev.io, dev.numio, dev.name);
> +	if (err) {
> +		free_irq(dev.irq, &dev);
> +		return err;
> +	}
> 
> regards,
> dan carpenter
> 
> > +	if (request_region(dev.io, dev.numio, dev.name) == NULL) {
> > +		free_irq(dev.irq, &dev);
> > +		return -ENOMEM;
> > +	}

  reply	other threads:[~2010-07-28 21:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28 16:41 [PATCH 09/10] oss: msnd: check request_region() return value Kulikov Vasiliy
2010-07-28 20:00 ` Dan Carpenter
2010-07-28 21:20   ` Dan Carpenter [this message]
2010-07-29 10:22     ` Takashi Iwai
2010-07-29 10:40       ` Vasiliy Kulikov

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=20100728212031.GQ26313@bicker \
    --to=error27@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andrewtv@usa.net \
    --cc=arnd@arndb.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=segooon@gmail.com \
    --cc=tiwai@suse.de \
    --cc=tj@kernel.org \
    /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