diff options
| author | Tobias Waldekranz <tobias@waldekranz.com> | 2022-01-18 22:50:53 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-27 09:19:53 +0100 |
| commit | d25fe9c255b697644bda9ddaba9e0f5a92b9a81c (patch) | |
| tree | 82c09f1e190173076dae422f927ef4a6e752cdf2 /drivers | |
| parent | 682a1e0ecbda5edf9d899cca99f57139b0ebbb6c (diff) | |
| download | linux-d25fe9c255b697644bda9ddaba9e0f5a92b9a81c.tar.gz linux-d25fe9c255b697644bda9ddaba9e0f5a92b9a81c.tar.bz2 linux-d25fe9c255b697644bda9ddaba9e0f5a92b9a81c.zip | |
net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module
commit 3f7c239c7844d2044ed399399d97a5f1c6008e1b upstream.
As reported by sparse: In the remove path, the driver would attempt to
unmap its own priv pointer - instead of the io memory that it mapped
in probe.
Fixes: 9f35a7342cff ("net/fsl: introduce Freescale 10G MDIO driver")
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/ethernet/freescale/xgmac_mdio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c index c82c85ef5fb3..c37aea7ba850 100644 --- a/drivers/net/ethernet/freescale/xgmac_mdio.c +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c @@ -301,9 +301,10 @@ err_ioremap: static int xgmac_mdio_remove(struct platform_device *pdev) { struct mii_bus *bus = platform_get_drvdata(pdev); + struct mdio_fsl_priv *priv = bus->priv; mdiobus_unregister(bus); - iounmap(bus->priv); + iounmap(priv->mdio_base); mdiobus_free(bus); return 0; |
