net: mdio-mux: bcm-iproc: fix wrong getter and setter pair
authorAnton Vasilyev <vasilyev@ispras.ru>
Fri, 27 Jul 2018 15:57:47 +0000 (18:57 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 29 Jul 2018 02:07:38 +0000 (19:07 -0700)
commitb0753408aadf32c7ece9e6b765017881e54af833
tree3da1e2a0de0213e447b74d32e6bbf2bd86dcdb1a
parent9fc12023d6f51551d6ca9ed7e02ecc19d79caf17
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>
drivers/net/phy/mdio-mux-bcm-iproc.c