From: Amitoj Kaur Chawla Date: Wed, 7 Oct 2015 05:26:23 +0000 (+0530) Subject: staging: rtl8712: Remove NULL comparison X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2a1283606f5f83f975f4f1abb34242004110f959;p=linux-beck.git staging: rtl8712: Remove NULL comparison Remove NULL comparison by using '!' operator. Problem found using checkpatch.pl CHECK: Comparison to NULL could be written "!ptmpchar" Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c index 469c5662c3bb..db0c1de8dc25 100644 --- a/drivers/staging/rtl8712/hal_init.c +++ b/drivers/staging/rtl8712/hal_init.c @@ -178,7 +178,7 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter) fwhdr.img_IMEM_size : fwhdr.img_SRAM_size; maxlen += txdscp_sz; ptmpchar = kmalloc(maxlen + FWBUFF_ALIGN_SZ, GFP_ATOMIC); - if (ptmpchar == NULL) + if (!ptmpchar) return ret; ptx_desc = (struct tx_desc *)(ptmpchar + FWBUFF_ALIGN_SZ -