Commit b0753408 authored by Anton Vasilyev's avatar Anton Vasilyev Committed by David S. Miller

net: mdio-mux: bcm-iproc: fix wrong getter and setter pair

mdio_mux_iproc_probe() uses platform_set_drvdata() to store md pointer
in device, whereas mdio_mux_iproc_remove() restores md pointer by
dev_get_platdata(&pdev->dev). This leads to wrong resources release.

The patch replaces getter to platform_get_drvdata.

Fixes: 98bc865a ("net: mdio-mux: Add MDIO mux driver for iProc SoCs")
Signed-off-by: default avatarAnton Vasilyev <vasilyev@ispras.ru>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9fc12023
......@@ -218,7 +218,7 @@ static int mdio_mux_iproc_probe(struct platform_device *pdev)
static int mdio_mux_iproc_remove(struct platform_device *pdev)
{
struct iproc_mdiomux_desc *md = dev_get_platdata(&pdev->dev);
struct iproc_mdiomux_desc *md = platform_get_drvdata(pdev);
mdio_mux_uninit(md->mux_handle);
mdiobus_unregister(md->mii_bus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment