Commit 9b272249 authored by Maxime Ripard's avatar Maxime Ripard Committed by Jiri Slaby

net: allwinner: emac: Add missing free_irq

commit b9111328 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: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 0c935c95
...@@ -726,6 +726,7 @@ static int emac_open(struct net_device *dev) ...@@ -726,6 +726,7 @@ static int emac_open(struct net_device *dev)
ret = emac_mdio_probe(dev); ret = emac_mdio_probe(dev);
if (ret < 0) { if (ret < 0) {
free_irq(dev->irq, dev);
netdev_err(dev, "cannot probe MDIO bus\n"); netdev_err(dev, "cannot probe MDIO bus\n");
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment