summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-05-05 16:19:44 +0300
committerDavid S. Miller <davem@davemloft.net>2016-05-07 15:15:32 -0400
commit1c755ffa4fa3e2d4112cadd30142344789ad2fd2 (patch)
tree8ec57b56379479b15410ea20251985fb0c1ffa70
parent545fea54916af5e88f02346d85301ba0ecc143f3 (diff)
downloadlinux-1c755ffa4fa3e2d4112cadd30142344789ad2fd2.tar.gz
netxen: reversed condition in netxen_nic_set_link_parameters()
My static checker complains that we are using "autoneg" without initializing it. The problem is the ->phy_read() condition is reversed so we only set this on error instead of success. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
index a3205410bb60..2b10f1bcd151 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
@@ -1944,7 +1944,7 @@ void netxen_nic_set_link_parameters(struct netxen_adapter *adapter)
if (adapter->phy_read &&
adapter->phy_read(adapter,
NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG,
- &autoneg) != 0)
+ &autoneg) == 0)
adapter->link_autoneg = autoneg;
} else
goto link_down;