mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-02 04:24:05 +00:00
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>
This commit is contained in:
parent
40c9f8ab6c
commit
b91113282b
1 changed files with 1 additions and 0 deletions
|
@ -736,6 +736,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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue