staging: rtl8712: Remove NULL comparison
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Wed, 7 Oct 2015 05:28:18 +0000 (10:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Oct 2015 09:25:32 +0000 (10:25 +0100)
Remove NULL comparison by using '!' operator. Problem found using
checkpatch.pl
CHECK: Comparison to NULL could be written "!padapter->halpriv.hal_bus_init"

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/hal_init.c

index db0c1de8dc255d69a97c2ea225d1d93d46aa1b01..15c6160fc32a40da6f34fdc3443159e906c58ed0 100644 (file)
@@ -382,7 +382,7 @@ uint rtl8712_hal_deinit(struct _adapter *padapter)
 uint rtl871x_hal_init(struct _adapter *padapter)
 {
        padapter->hw_init_completed = false;
-       if (padapter->halpriv.hal_bus_init == NULL)
+       if (!padapter->halpriv.hal_bus_init)
                return _FAIL;
        if (padapter->halpriv.hal_bus_init(padapter) != _SUCCESS)
                return _FAIL;