aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712
diff options
context:
space:
mode:
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>2015-10-07 10:56:23 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-08 10:25:32 +0100
commit2a1283606f5f83f975f4f1abb34242004110f959 (patch)
treed54740cea2fca9187e96fa8518c26f83a2e8c24d /drivers/staging/rtl8712
parentstaging: rtl8712: Move constant to right of test or replace with "!" (diff)
downloadlinux-dev-2a1283606f5f83f975f4f1abb34242004110f959.tar.xz
linux-dev-2a1283606f5f83f975f4f1abb34242004110f959.zip
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 <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712')
-rw-r--r--drivers/staging/rtl8712/hal_init.c2
1 files changed, 1 insertions, 1 deletions
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 -