summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2017-05-25 23:54:53 +0300
committerBen Hutchings <ben@decadent.org.uk>2017-09-15 20:30:48 +0300
commit69615f190d3124cc5bf4cecbbfcb59e342572f26 (patch)
tree3ff0ed169472b7682d9119d1fba1494fd55ed5ae /drivers
parent9807ef7c8e319be7da49c9b0c41e70cb8245d8e2 (diff)
downloadlinux-69615f190d3124cc5bf4cecbbfcb59e342572f26.tar.xz
net: ethernet: ax88796: don't call free_irq without request_irq first
commit 82533ad9a1ce3a7a6863849a552c2cc041b55e0d upstream. The function ax_init_dev (which is called only from the driver's .probe function) calls free_irq in the error path without having requested the irq in the first place. So drop the free_irq call in the error path. Fixes: 825a2ff1896e ("AX88796 network driver") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/8390/ax88796.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c
index e9f8432f55b4..fdffd122f5cb 100644
--- a/drivers/net/ethernet/8390/ax88796.c
+++ b/drivers/net/ethernet/8390/ax88796.c
@@ -769,13 +769,13 @@ static int ax_init_dev(struct net_device *dev)
ret = ax_mii_init(dev);
if (ret)
- goto out_irq;
+ goto err_out;
ax_NS8390_init(dev, 0);
ret = register_netdev(dev);
if (ret)
- goto out_irq;
+ goto err_out;
netdev_info(dev, "%dbit, irq %d, %lx, MAC: %pM\n",
ei_local->word16 ? 16 : 8, dev->irq, dev->base_addr,
@@ -783,9 +783,6 @@ static int ax_init_dev(struct net_device *dev)
return 0;
- out_irq:
- /* cleanup irq */
- free_irq(dev->irq, dev);
err_out:
return ret;
}