]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: wilc1000: fix NULL comparison style
authorChaehyun Lim <chaehyun.lim@gmail.com>
Sun, 20 Sep 2015 06:51:10 +0000 (15:51 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Sep 2015 02:02:10 +0000 (19:02 -0700)
This patch fixes NULL comparison style found by checkpatch.pl.

CHECK: Comparison to NULL could be written "!net"
CHECK: Comparison to NULL could be written "!net->ieee80211_ptr"
CHECK: Comparison to NULL could be written "!net->ieee80211_ptr->wiphy"

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

index e51745e74dc76e6e948e1dcb53e53fbb55a250b0..af11af3f7ac2edcc01a4588adebac9de82d2353c 100644 (file)
@@ -3694,17 +3694,17 @@ void wilc_free_wiphy(struct net_device *net)
 
        PRINT_D(CFG80211_DBG, "Unregistering wiphy\n");
 
-       if (net == NULL) {
+       if (!net) {
                PRINT_D(INIT_DBG, "net_device is NULL\n");
                return;
        }
 
-       if (net->ieee80211_ptr == NULL) {
+       if (!net->ieee80211_ptr) {
                PRINT_D(INIT_DBG, "ieee80211_ptr is NULL\n");
                return;
        }
 
-       if (net->ieee80211_ptr->wiphy == NULL) {
+       if (!net->ieee80211_ptr->wiphy) {
                PRINT_D(INIT_DBG, "wiphy is NULL\n");
                return;
        }