Staging: rtl8188eu: hal: rtl8188eu_xmit.c: Remove explicit NULL comparison
authorShraddha Barke <shraddha.6596@gmail.com>
Fri, 11 Sep 2015 05:10:56 +0000 (10:40 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:25:01 +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/rtl8188eu_xmit.c

index 594c1da9db23d6d498456828ac0242fd18db4c1a..44335605f2f689ed30334bd9d7ab1c7a81908331 100644 (file)
@@ -649,7 +649,7 @@ static s32 pre_xmitframe(struct adapter *adapt, struct xmit_frame *pxmitframe)
                goto enqueue;
 
        pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
-       if (pxmitbuf == NULL)
+       if (!pxmitbuf)
                goto enqueue;
 
        spin_unlock_bh(&pxmitpriv->lock);