From: Uwe Kleine-König Date: Thu, 25 May 2017 20:54:53 +0000 (+0200) Subject: net: ethernet: ax88796: don't call free_irq without request_irq first X-Git-Tag: MMI-PSA29.97-13-9~5530^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=82533ad9a1ce3a7a6863849a552c2cc041b55e0d;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git net: ethernet: ax88796: don't call free_irq without request_irq first 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c index b0a3b85fc6f8..db02bc2fb4b2 100644 --- a/drivers/net/ethernet/8390/ax88796.c +++ b/drivers/net/ethernet/8390/ax88796.c @@ -748,13 +748,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, @@ -762,9 +762,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; }