Skip to content

Commit

Permalink
net: allwinner: emac: Add missing free_irq
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxime Ripard authored and David S. Miller committed Jun 25, 2014
1 parent 40c9f8a commit b911132
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/allwinner/sun4i-emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ static int emac_open(struct net_device *dev)

ret = emac_mdio_probe(dev);
if (ret < 0) {
free_irq(dev->irq, dev);
netdev_err(dev, "cannot probe MDIO bus\n");
return ret;
}
Expand Down

0 comments on commit b911132

Please sign in to comment.