diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-06-24 00:49:40 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-26 03:31:17 +0400 |
commit | b91113282bf44df46aba374a0b8f88a75bfd4b3f (patch) | |
tree | d1d94b894b448033edbc7539e488d87b445127f1 /drivers/net/ethernet/allwinner | |
parent | 40c9f8ab6c0f3e3c36dc3fb4ec81a25a0a207789 (diff) | |
download | linux-b91113282bf44df46aba374a0b8f88a75bfd4b3f.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/allwinner')
-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 28460676b8ca..d81e7167a8b5 100644 --- a/drivers/net/ethernet/allwinner/sun4i-emac.c +++ b/drivers/net/ethernet/allwinner/sun4i-emac.c @@ -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; } |