Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6ed74236 authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller
Browse files

of: of_mdio: Ensure mdio device is a PHY



of_phy_find_device() is used to find the phy device associated with a
device node. It is expected the node is for a PHY device, but in fact
it could of been probed as a generic MDIO device. Ensure the device is
a PHY before returning it.

Fixes: a9049e0c ("mdio: Add support for mdio drivers.")
Reported-by: default avatarAaro Koskinen <aaro.koskinen@nokia.com>
Reported-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarAaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bd7c5e31
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment