lkml.org 
[lkml]   [2014]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Staging: ced1401: fix coding style in ced_ioc.c
From
Date
On Mon, 2014-01-13 at 15:56 -0800, Greg KH wrote:
> On Mon, Jan 13, 2014 at 08:41:40PM +0100, Pol Eyschen wrote:
[]
> > diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c
[]
> > @@ -41,7 +41,8 @@ static void FlushOutBuff(DEVICE_EXTENSION *pdx)
> > {
> > dev_dbg(&pdx->interface->dev, "%s currentState=%d", __func__,
> > pdx->sCurrentState);
> > - if (pdx->sCurrentState == U14ERR_TIME) /* Do nothing if hardware in trouble */
> > + if (pdx->sCurrentState == U14ERR_TIME)
> > + /* Do nothing if hardware in trouble */
> > return;
>
> Please wrap stuff like this in { } to not confuse people.

Yes please, or maybe put the comment on the return line like:

if (pdx->sCurrentState == U14ERR_TIME)
return; /* Do nothing if hardware in trouble */

or above the test like:

/* Do nothing if hardware in trouble */
if (pdx->sCurrentState == U14ERR_TIME)
return;





\
 
 \ /
  Last update: 2014-01-14 04:01    [W:0.062 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site