summaryrefslogtreecommitdiff
path: root/drivers/phy/marvell/phy-mvebu-a3700-comphy.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2019-01-08 19:31:18 +0300
committerKishon Vijay Abraham I <kishon@ti.com>2019-02-07 08:40:46 +0300
commitae4c5d69acc012ba40680cf8b63a2845622cc7c7 (patch)
tree398b2567579a1822355343c950cd97a1873a5a75 /drivers/phy/marvell/phy-mvebu-a3700-comphy.c
parent65f04fea91cf8e271cae2077cf0c5a73a630aef6 (diff)
downloadlinux-ae4c5d69acc012ba40680cf8b63a2845622cc7c7.tar.xz
phy: mvebu-cp110-comphy: fix port check in ->xlate()
So far the PHY ->xlate() callback was checking if the port was "invalid" before continuing, meaning that the port has not been used yet. This check is not correct as there is no opposite call to ->xlate() once the PHY is released by the user and the port will remain "valid" after the first phy_get()/phy_put() calls. Hence, if this driver is built as a module, inserted, removed and inserted again, the PHY will appear busy and the second probe will fail. To fix this, just drop the faulty check and instead verify that the port number is valid (ie. in the possible range). Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy/marvell/phy-mvebu-a3700-comphy.c')
0 files changed, 0 insertions, 0 deletions