diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-06-23 22:49:40 +0200 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-07-18 15:51:02 +0200 |
commit | 9b272249cf3509f4d61120fa900c5ab143534437 (patch) | |
tree | aca208241aae06535fef6e62dd65ea1d1428f894 /drivers | |
parent | 0c935c957f255c6253692b9f2b764861b88527ca (diff) |
net: allwinner: emac: Add missing free_irq
commit b91113282bf44df46aba374a0b8f88a75bfd4b3f upstream.
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/allwinner/sun4i-emac.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c index 46dfb1378c1..81576c6c31e 100644 --- a/drivers/net/ethernet/allwinner/sun4i-emac.c +++ b/drivers/net/ethernet/allwinner/sun4i-emac.c @@ -726,6 +726,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; } |