aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/netdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000e/netdev.c')
-rw-r--r--drivers/net/e1000e/netdev.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 0a2cb7960c9e..f58f017ee47a 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -945,11 +945,7 @@ static int e1000_request_irq(struct e1000_adapter *adapter)
945 int irq_flags = IRQF_SHARED; 945 int irq_flags = IRQF_SHARED;
946 int err; 946 int err;
947 947
948 err = pci_enable_msi(adapter->pdev); 948 if (!pci_enable_msi(adapter->pdev)) {
949 if (err) {
950 ndev_warn(netdev,
951 "Unable to allocate MSI interrupt Error: %d\n", err);
952 } else {
953 adapter->flags |= FLAG_MSI_ENABLED; 949 adapter->flags |= FLAG_MSI_ENABLED;
954 handler = e1000_intr_msi; 950 handler = e1000_intr_msi;
955 irq_flags = 0; 951 irq_flags = 0;
@@ -958,10 +954,12 @@ static int e1000_request_irq(struct e1000_adapter *adapter)
958 err = request_irq(adapter->pdev->irq, handler, irq_flags, netdev->name, 954 err = request_irq(adapter->pdev->irq, handler, irq_flags, netdev->name,
959 netdev); 955 netdev);
960 if (err) { 956 if (err) {
957 ndev_err(netdev,
958 "Unable to allocate %s interrupt (return: %d)\n",
959 adapter->flags & FLAG_MSI_ENABLED ? "MSI":"INTx",
960 err);
961 if (adapter->flags & FLAG_MSI_ENABLED) 961 if (adapter->flags & FLAG_MSI_ENABLED)
962 pci_disable_msi(adapter->pdev); 962 pci_disable_msi(adapter->pdev);
963 ndev_err(netdev,
964 "Unable to allocate interrupt Error: %d\n", err);
965 } 963 }
966 964
967 return err; 965 return err;