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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Aug 2018 14:23:01 +0000 (16:23 +0200)
commit32363930dfd2eb8449d062cb590918021f8d7502
tree95694ec48c0010de38ee40d0d8178f2942c6a42f
parenta9deaa19715d5c2b355fff98c4d54049d337311d
net: mdio-mux: bcm-iproc: fix wrong getter and setter pair

[ Upstream commit b0753408aadf32c7ece9e6b765017881e54af833 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/mdio-mux-bcm-iproc.c