diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index ff5eec5af817..2733112b3527 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -51,7 +51,9 @@ static void devm_phy_consume(struct device *dev, void *res) static int devm_phy_match(struct device *dev, void *res, void *match_data) { - return res == match_data; + struct phy **phy = res; + + return *phy == match_data; } static struct phy *phy_lookup(struct device *device, const char *port)