Re: [PATCH 09/10] oss: msnd: check request_region() return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?


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;
> > > +	}
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux