Skip to content

Commit

Permalink
net: ethernet: ax88796: don't call free_irq without request_irq first
Browse files Browse the repository at this point in the history
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: 825a2ff ("AX88796 network driver")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Uwe Kleine-König authored and David S. Miller committed May 26, 2017
1 parent 0e9a709 commit 82533ad
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/net/ethernet/8390/ax88796.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,23 +748,20 @@ 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,
dev->dev_addr);

return 0;

out_irq:
/* cleanup irq */
free_irq(dev->irq, dev);
err_out:
return ret;
}
Expand Down

0 comments on commit 82533ad

Please sign in to comment.