]> git.karo-electronics.de Git - linux-beck.git/commitdiff
i40evf: make comparisons consistent
authorMitch Williams <mitch.a.williams@intel.com>
Tue, 11 Nov 2014 20:02:52 +0000 (20:02 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 20 Nov 2014 22:56:43 +0000 (14:56 -0800)
Most of the null-checking in this driver is of the style if (!foo),
except these few. Make these checks consistent with the rest of the
code.

Change-ID: I991924f34072fa607a1b626a8b3f1fa5195d43e9
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40evf/i40evf_main.c

index 777d3a5161c3b5735ff69be3b7d2ca3b1fc953a2..233710c91c84ba78872b43fb26fff317dc3ba117 100644 (file)
@@ -669,9 +669,9 @@ i40evf_vlan_filter *i40evf_add_vlan(struct i40evf_adapter *adapter, u16 vlan)
        struct i40evf_vlan_filter *f;
 
        f = i40evf_find_vlan(adapter, vlan);
-       if (NULL == f) {
+       if (!f) {
                f = kzalloc(sizeof(*f), GFP_ATOMIC);
-               if (NULL == f)
+               if (!f)
                        return NULL;
 
                f->vlan = vlan;
@@ -774,9 +774,9 @@ i40evf_mac_filter *i40evf_add_filter(struct i40evf_adapter *adapter,
                udelay(1);
 
        f = i40evf_find_filter(adapter, macaddr);
-       if (NULL == f) {
+       if (!f) {
                f = kzalloc(sizeof(*f), GFP_ATOMIC);
-               if (NULL == f) {
+               if (!f) {
                        clear_bit(__I40EVF_IN_CRITICAL_TASK,
                                  &adapter->crit_section);
                        return NULL;
@@ -2138,7 +2138,7 @@ static void i40evf_init_task(struct work_struct *work)
        ether_addr_copy(netdev->perm_addr, adapter->hw.mac.addr);
 
        f = kzalloc(sizeof(*f), GFP_ATOMIC);
-       if (NULL == f)
+       if (!f)
                goto err_sw_init;
 
        ether_addr_copy(f->macaddr, adapter->hw.mac.addr);