diff options
author | Anton Vasilyev <vasilyev@ispras.ru> | 2018-07-27 17:57:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-29 04:07:38 +0200 |
commit | b0753408aadf32c7ece9e6b765017881e54af833 (patch) | |
tree | 3da1e2a0de0213e447b74d32e6bbf2bd86dcdb1a | |
parent | ipv4: remove BUG_ON() from fib_compute_spec_dst (diff) | |
download | linux-b0753408aadf32c7ece9e6b765017881e54af833.tar.xz linux-b0753408aadf32c7ece9e6b765017881e54af833.zip |
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: 98bc865a1ec8 ("net: mdio-mux: Add MDIO mux driver for iProc SoCs")
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/mdio-mux-bcm-iproc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/mdio-mux-bcm-iproc.c b/drivers/net/phy/mdio-mux-bcm-iproc.c index 0831b7142df7..0c5b68e7da51 100644 --- a/drivers/net/phy/mdio-mux-bcm-iproc.c +++ b/drivers/net/phy/mdio-mux-bcm-iproc.c @@ -218,7 +218,7 @@ out: 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); |