Re: [staging-next 09/12] staging/eascap: add first level indentation to regget/set functions

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

 



On Wed, Feb 09, 2011 at 07:29:33AM +0200, Winkler, Tomas wrote:
> > On Wed, Feb 09, 2011 at 01:12:48AM +0200, Tomas Winkler wrote:
> > > +
> > > +	return 0xFF & rc;
> > 
> > You didn't introduce this, but it's wrong.  It's masking out negative
> > error codes.  The caller does check for error codes.  Probably it
> > would make more sense to just return rc directly...  I'm not sure what
> > was intended here.
> 
> You have a point although in this particular case it is more pointless
> then wrong.  I will fix in another patch, though.

usb_control_msg() returns the number of bytes transfered or it returns
a negative error code.  The mask would change a return value of -ENOMEM
into 244 bytes successfully transfered.  So that's definitely not right.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux