diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-05-05 16:19:44 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-07 15:15:32 -0400 |
commit | 1c755ffa4fa3e2d4112cadd30142344789ad2fd2 (patch) | |
tree | 8ec57b56379479b15410ea20251985fb0c1ffa70 | |
parent | 545fea54916af5e88f02346d85301ba0ecc143f3 (diff) | |
download | op-kernel-dev-1c755ffa4fa3e2d4112cadd30142344789ad2fd2.zip op-kernel-dev-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.c | 2 |
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 a320541..2b10f1b 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; |