RDMA/nes: Fix test of uninitialized netdev
authorRoland Dreier <roland@purestorage.com>
Fri, 25 Mar 2011 00:13:20 +0000 (17:13 -0700)
committerRoland Dreier <roland@purestorage.com>
Fri, 25 Mar 2011 00:18:30 +0000 (17:18 -0700)
Commit 1765a575334f ("net: make dev->master general") introduced a
test of an uninitialized netdev.  Fix the code so the intended netdev
is tested.

Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/nes/nes_cm.c

index ef32915..cfa3a2b 100644 (file)
@@ -1116,7 +1116,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
                return rc;
        }
 
-       if (netif_is_bond_slave(netdev))
+       if (netif_is_bond_slave(nesvnic->netdev))
                netdev = nesvnic->netdev->master;
        else
                netdev = nesvnic->netdev;