mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
net: mdio: thunder: Fix a double free issue in the .remove function
[ Upstream commit a93a0a15876d2a077a3bc260b387d2457a051f24 ]
'bus->mii_bus' have been allocated with 'devm_mdiobus_alloc_size()' in the
probe function. So it must not be freed explicitly or there will be a
double free.
Remove the incorrect 'mdiobus_free' in the remove function.
Fixes: 379d7ac7ca ("phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses.")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
20255d41ac
commit
2e0fba911c
1 changed files with 0 additions and 1 deletions
|
|
@ -126,7 +126,6 @@ static void thunder_mdiobus_pci_remove(struct pci_dev *pdev)
|
|||
continue;
|
||||
|
||||
mdiobus_unregister(bus->mii_bus);
|
||||
mdiobus_free(bus->mii_bus);
|
||||
oct_mdio_writeq(0, bus->register_base + SMI_EN);
|
||||
}
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue