lkml.org 
[lkml]   [2015]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drivers:staging:wilc1000 Fix comparison to NULL messages
On Tue, Nov 17, 2015 at 09:01:28PM +0100, Bogicevic Sasa wrote:
> This fixes all "Comparison to NULL could be written like..."
> messages from checkpatch.pl
>
> Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com>
> ---
> drivers/staging/wilc1000/coreconfigurator.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
> index fd7240c..a31ac55 100644
> --- a/drivers/staging/wilc1000/coreconfigurator.c
> +++ b/drivers/staging/wilc1000/coreconfigurator.c
> @@ -434,7 +434,7 @@ s32 parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo)
>
> /* Get DTIM Period */
> pu8TimElm = get_tim_elm(pu8msa, u16RxLen + FCS_LEN, u8index);
> - if (pu8TimElm != NULL)
> + if (!pu8TimElm)

You are now checking for - if (pu8TimElm == NULL)
It should actually be: if (pu8TimElm)

regards
sudip


\
 
 \ /
  Last update: 2015-11-18 07:41    [W:0.030 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site