staging: rtl8712: os_intfs: Change form of NULL comparisons
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Sun, 20 Mar 2016 19:53:17 +0000 (01:23 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
Change null comparisons of the form x == NULL to !x.
This was done using Coccinelle.
@@ expression e;
@@
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/os_intfs.c

index ab19112eae13104330da4b7776f410eee412187e..57211f7e68a5e2917aefc435178a00f39c0b53dc 100644 (file)
@@ -389,7 +389,7 @@ static int netdev_open(struct net_device *pnetdev)
                padapter->bup = true;
                if (rtl871x_hal_init(padapter) != _SUCCESS)
                        goto netdev_open_error;
-               if (r8712_initmac == NULL)
+               if (!r8712_initmac)
                        /* Use the mac address stored in the Efuse */
                        memcpy(pnetdev->dev_addr,
                                padapter->eeprompriv.mac_addr, ETH_ALEN);
@@ -413,7 +413,7 @@ static int netdev_open(struct net_device *pnetdev)
                }
                if (start_drv_threads(padapter) != _SUCCESS)
                        goto netdev_open_error;
-               if (padapter->dvobjpriv.inirp_init == NULL)
+               if (!padapter->dvobjpriv.inirp_init)
                        goto netdev_open_error;
                else
                        padapter->dvobjpriv.inirp_init(padapter);