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>
Fri, 3 Aug 2018 05:50:44 +0000 (07:50 +0200)
commite071e2fdf45e1505436ad61e42b0d44904db1997
tree930549b583008edf53d869dfce352cfffc7d9535
parentccdbe7e2374a0be4ab81d70b53d23dd12b043648
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