Re: [PATCH 25/30] staging: nvec: Return -1 in PS2 driver if write fails

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

 



On Sat, Sep 24, 2011 at 01:01:18PM +0200, Julian Andres Klode wrote:
> On Sat, Sep 24, 2011 at 01:49:55PM +0300, Dan Carpenter wrote:
> > On Fri, Sep 23, 2011 at 06:38:17PM +0200, Julian Andres Klode wrote:
> > > If nvec_write_async() fails, return -1 in the relevant
> > > parts of the PS2 driver.
> > > 
> > 
> > Returning raw -1 is never the right idea.  (It means -EPERM). Save
> > the return code from the lower layers and return that.
> I did this because serio_write() returns -1 if serio->write
> is not available, so I though I'm supposed to return -1 in
> case of errors.
> 

Yes, yes...  There is sloppy code throughout.  Back in the day, they
didn't have checkpatch fascists doing micro reviews and hassling
everyone about trivial crap.  But we have me.  :)

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