This is a note to let you know that I've just added the patch titled net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module to the 5.16-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-fsl-xgmac_mdio-fix-incorrect-iounmap-when-removing-module.patch and it can be found in the queue-5.16 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 3f7c239c7844d2044ed399399d97a5f1c6008e1b Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz <tobias@xxxxxxxxxxxxxx> Date: Tue, 18 Jan 2022 22:50:53 +0100 Subject: net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module From: Tobias Waldekranz <tobias@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx> Reviewed-by: Andrew Lunn <andrew@xxxxxxx> Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/ethernet/freescale/xgmac_mdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/freescale/xgmac_mdio.c +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c @@ -331,9 +331,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; Patches currently in stable-queue which might be from tobias@xxxxxxxxxxxxxx are queue-5.16/powerpc-fsl-dts-enable-wa-for-erratum-a-009885-on-fman3l-mdio-buses.patch queue-5.16/net-fsl-xgmac_mdio-fix-incorrect-iounmap-when-removing-module.patch queue-5.16/net-fsl-xgmac_mdio-add-workaround-for-erratum-a-009885.patch