mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
net: allwinner: emac: Add missing free_irq
commit b91113282b 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d3ec86e1b4
commit
3cfccac173
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user