[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100729104006.GA28465@albatros>
Date: Thu, 29 Jul 2010 14:40:06 +0400
From: Vasiliy Kulikov <segooon@...il.com>
To: Takashi Iwai <tiwai@...e.de>
Cc: Dan Carpenter <error27@...il.com>, kernel-janitors@...r.kernel.org,
Andrew Veliath <andrewtv@....net>,
Jaroslav Kysela <perex@...ex.cz>,
Arnd Bergmann <arnd@...db.de>, Tejun Heo <tj@...nel.org>,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/10] oss: msnd: check request_region() return value
On Thu, Jul 29, 2010 at 12:22 +0200, Takashi Iwai wrote:
> At Wed, 28 Jul 2010 23:20:31 +0200,
> Dan Carpenter wrote:
> >
> > 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.
>
> Agreed.
>
> Kulikov, could you rewrite the patches with -EBUSY?
No problem, patches are coming.
>
>
> thanks,
>
> Takashi
>
> >
> > 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;
> > > > + }
> >
--
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