[PATCHv2] staging: rts5208: remove variable and check directly

Dan Carpenter dan.carpenter at oracle.com
Mon Jun 1 11:02:06 UTC 2015


On Mon, Jun 01, 2015 at 10:27:35AM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
> On Mon, Jun 01, 2015 at 01:12:18PM +0300, Dan Carpenter wrote:
> > On Mon, Jun 01, 2015 at 09:41:52AM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
> > > From: Hari Prasath Gujulan Elango <hgujulan at visteon.com>
> > > 
> > > This trivial patch removes temporary variable to check return value of
> > > a function and checks return value directly.
> > > 
> > 
> > This isn't an improvement.  We want to adopt normal kernel error codes
> > every where but this code moves us backward.
> > 
> > regards,
> > dan carpenter
> > 
> 
> Dan yes this doesn't make any improvement.The 'retval' variable was used
> only at this place so removed it. This 'retval' value is not returned as
> well in this function.

It's not returned but it probably should be eventually.  Also the
original code is slightly easier to read.

regards,
dan carpenter



More information about the devel mailing list