Staging: rtl8188eu: Remove explicit NULL comparison
authorShraddha Barke <shraddha.6596@gmail.com>
Fri, 11 Sep 2015 05:10:53 +0000 (10:40 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:25:00 +0000 (18:25 -0700)
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c

index 0a62bfa210febdc0f6cd58f58ab68c1d498fdc49..d5281409168d7183c7c52eaa67cd711d797bd91b 100644 (file)
@@ -467,7 +467,7 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished)
 
        DBG_88E("%s\n", __func__);
        ReservedPagePacket = kzalloc(1000, GFP_KERNEL);
-       if (ReservedPagePacket == NULL) {
+       if (!ReservedPagePacket) {
                DBG_88E("%s: alloc ReservedPagePacket fail!\n", __func__);
                return;
        }
@@ -537,7 +537,7 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished)
 
        TotalPacketLen = BufIndex + QosNullLength;
        pmgntframe = alloc_mgtxmitframe(pxmitpriv);
-       if (pmgntframe == NULL)
+       if (!pmgntframe)
                goto exit;
 
        /*  update attribute */