Skip to content

Commit 82533ad

Browse files
Uwe Kleine-Königdavem330
authored andcommitted
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: 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>
1 parent 0e9a709 commit 82533ad

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/net/ethernet/8390/ax88796.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -748,23 +748,20 @@ static int ax_init_dev(struct net_device *dev)
748748

749749
ret = ax_mii_init(dev);
750750
if (ret)
751-
goto out_irq;
751+
goto err_out;
752752

753753
ax_NS8390_init(dev, 0);
754754

755755
ret = register_netdev(dev);
756756
if (ret)
757-
goto out_irq;
757+
goto err_out;
758758

759759
netdev_info(dev, "%dbit, irq %d, %lx, MAC: %pM\n",
760760
ei_local->word16 ? 16 : 8, dev->irq, dev->base_addr,
761761
dev->dev_addr);
762762

763763
return 0;
764764

765-
out_irq:
766-
/* cleanup irq */
767-
free_irq(dev->irq, dev);
768765
err_out:
769766
return ret;
770767
}

0 commit comments

Comments
 (0)