From 2a1283606f5f83f975f4f1abb34242004110f959 Mon Sep 17 00:00:00 2001 From: Amitoj Kaur Chawla Date: Wed, 7 Oct 2015 10:56:23 +0530 Subject: [PATCH] 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 --- drivers/staging/rtl8712/hal_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 - -- 2.39.5