summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/nvidia
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@redhat.com>2014-02-18 11:11:53 +0100
committerDavid S. Miller <davem@davemloft.net>2014-02-18 15:33:33 -0500
commitd9bd00a1ddac89a9d370cf9cdee018b9343114fc (patch)
treee587ba693166e7141237814179ec8ff7675d4c02 /drivers/net/ethernet/nvidia
parent61c9471e4d1931cc515872aca59d441a73d82c39 (diff)
downloadlinux-d9bd00a1ddac89a9d370cf9cdee018b9343114fc.tar.bz2
forcedeth: Cleanup MSI-X to MSI to INTx fallback code
Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Patrick McHardy <kaber@trash.net> Cc: netdev@vger.kernel.org Cc: linux-pci@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/nvidia')
-rw-r--r--drivers/net/ethernet/nvidia/forcedeth.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index f4270b844a7f..74da48939e4e 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -3930,7 +3930,7 @@ static int nv_request_irq(struct net_device *dev, int intr_test)
{
struct fe_priv *np = get_nvpriv(dev);
u8 __iomem *base = get_hwbase(dev);
- int ret = 1;
+ int ret;
int i;
irqreturn_t (*handler)(int foo, void *data);
@@ -4010,9 +4010,10 @@ static int nv_request_irq(struct net_device *dev, int intr_test)
writel(0, base + NvRegMSIXMap1);
}
netdev_info(dev, "MSI-X enabled\n");
+ return 0;
}
}
- if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) {
+ if (np->msi_flags & NV_MSI_CAPABLE) {
ret = pci_enable_msi(np->pci_dev);
if (ret == 0) {
np->msi_flags |= NV_MSI_ENABLED;
@@ -4031,13 +4032,12 @@ static int nv_request_irq(struct net_device *dev, int intr_test)
/* enable msi vector 0 */
writel(NVREG_MSI_VECTOR_0_ENABLED, base + NvRegMSIIrqMask);
netdev_info(dev, "MSI enabled\n");
+ return 0;
}
}
- if (ret != 0) {
- if (request_irq(np->pci_dev->irq, handler, IRQF_SHARED, dev->name, dev) != 0)
- goto out_err;
- }
+ if (request_irq(np->pci_dev->irq, handler, IRQF_SHARED, dev->name, dev) != 0)
+ goto out_err;
return 0;
out_free_tx: