Commit 57d37aea authored by Arjun Vynipadath's avatar Arjun Vynipadath Committed by David S. Miller
Browse files

cxgb4vf: Call netif_carrier_off properly in pci_probe



netif_carrier_off() should be called only after register_netdev().

Signed-off-by: default avatarArjun Vynipadath <arjun@chelsio.com>
Signed-off-by: default avatarVishal Kulkarni <vishal@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0960004b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3136,7 +3136,6 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev,
		 * it.
		 */
		pi->xact_addr_filt = -1;
		netif_carrier_off(netdev);
		netdev->irq = pdev->irq;

		netdev->hw_features = NETIF_F_SG | TSO_FLAGS | NETIF_F_GRO |
@@ -3259,6 +3258,7 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev,
			continue;
		}

		netif_carrier_off(netdev);
		set_bit(pidx, &adapter->registered_device_map);
	}
	if (adapter->registered_device_map == 0) {