Răsfoiți Sursa

igb: correct hardware type (i210/i211) check in igb_loopback_test()

In the original code
...
 	if ((adapter->hw.mac.type == e1000_i210)
		|| (adapter->hw.mac.type == e1000_i210)) {
...
the second check of 'adapter->hw.mac.type' is pointless since it tests
for the exact same value as the first.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Jesper Juhl 13 ani în urmă
părinte
comite
89d351c046
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      drivers/net/ethernet/intel/igb/igb_ethtool.c

+ 1 - 1
drivers/net/ethernet/intel/igb/igb_ethtool.c

@@ -1783,7 +1783,7 @@ static int igb_loopback_test(struct igb_adapter *adapter, u64 *data)
 		goto out;
 		goto out;
 	}
 	}
 	if ((adapter->hw.mac.type == e1000_i210)
 	if ((adapter->hw.mac.type == e1000_i210)
-		|| (adapter->hw.mac.type == e1000_i210)) {
+		|| (adapter->hw.mac.type == e1000_i211)) {
 		dev_err(&adapter->pdev->dev,
 		dev_err(&adapter->pdev->dev,
 			"Loopback test not supported "
 			"Loopback test not supported "
 			"on this part at this time.\n");
 			"on this part at this time.\n");