diff options
Diffstat (limited to 'drivers/net/ethernet/atheros/alx/main.c')
-rw-r--r-- | drivers/net/ethernet/atheros/alx/main.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c index 027398ebbba6..fc95b235e210 100644 --- a/drivers/net/ethernet/atheros/alx/main.c +++ b/drivers/net/ethernet/atheros/alx/main.c | |||
@@ -1188,7 +1188,7 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1188 | struct alx_priv *alx; | 1188 | struct alx_priv *alx; |
1189 | struct alx_hw *hw; | 1189 | struct alx_hw *hw; |
1190 | bool phy_configured; | 1190 | bool phy_configured; |
1191 | int bars, pm_cap, err; | 1191 | int bars, err; |
1192 | 1192 | ||
1193 | err = pci_enable_device_mem(pdev); | 1193 | err = pci_enable_device_mem(pdev); |
1194 | if (err) | 1194 | if (err) |
@@ -1225,18 +1225,13 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1225 | pci_enable_pcie_error_reporting(pdev); | 1225 | pci_enable_pcie_error_reporting(pdev); |
1226 | pci_set_master(pdev); | 1226 | pci_set_master(pdev); |
1227 | 1227 | ||
1228 | pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); | 1228 | if (!pdev->pm_cap) { |
1229 | if (pm_cap == 0) { | ||
1230 | dev_err(&pdev->dev, | 1229 | dev_err(&pdev->dev, |
1231 | "Can't find power management capability, aborting\n"); | 1230 | "Can't find power management capability, aborting\n"); |
1232 | err = -EIO; | 1231 | err = -EIO; |
1233 | goto out_pci_release; | 1232 | goto out_pci_release; |
1234 | } | 1233 | } |
1235 | 1234 | ||
1236 | err = pci_set_power_state(pdev, PCI_D0); | ||
1237 | if (err) | ||
1238 | goto out_pci_release; | ||
1239 | |||
1240 | netdev = alloc_etherdev(sizeof(*alx)); | 1235 | netdev = alloc_etherdev(sizeof(*alx)); |
1241 | if (!netdev) { | 1236 | if (!netdev) { |
1242 | err = -ENOMEM; | 1237 | err = -ENOMEM; |