Skip to content

Commit b911132

Browse files
mriparddavem330
authored andcommitted
net: allwinner: emac: Add missing free_irq
If the mdio probe function fails in emac_open, the interrupt we just requested isn't freed. If emac_open is called again, for example because we try to set up the interface again, the kernel will oops because the interrupt wasn't properly released. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: <stable@vger.kernel.org> # 3.11+ Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 40c9f8a commit b911132

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/net/ethernet/allwinner/sun4i-emac.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@ static int emac_open(struct net_device *dev)
736736

737737
ret = emac_mdio_probe(dev);
738738
if (ret < 0) {
739+
free_irq(dev->irq, dev);
739740
netdev_err(dev, "cannot probe MDIO bus\n");
740741
return ret;
741742
}

0 commit comments

Comments
 (0)