On Mon, Jun 18, 2012 at 11:21:55PM -0400, Kevin McKinney wrote: > This patch changes all conditions that check for NULL > from "if (variable == NULL)" or "if (NULL == variable)" > to "if (variable)" to make code more readable. > > Signed-off-by: Kevin McKinney <klmckinney1@xxxxxxxxx> > --- > drivers/staging/bcm/nvm.c | 32 ++++++++++++++++---------------- > 1 file changed, 16 insertions(+), 16 deletions(-) > > diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c > index 14fce10..b3765bd 100644 > --- a/drivers/staging/bcm/nvm.c > +++ b/drivers/staging/bcm/nvm.c > @@ -1067,7 +1067,7 @@ static int BeceemFlashBulkWrite(struct bcm_mini_adapter *Adapter, > uiSectBoundary = uiSectAlignAddr + Adapter->uiSectorSize; > > pTempBuff = kmalloc(Adapter->uiSectorSize, GFP_KERNEL); > - if (NULL == pTempBuff) > + if (pTempBuff) > goto BeceemFlashBulkWrite_EXIT; > /* > * check if the data to be written is overlapped across sectors Uh... A bunch of these tests are reversed. I think they could have been caught with Smatch but I haven't checked. kchecker --spammy drivers/staging/bcm/nvm.c regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel