Skip to content
Commit bd78f2c2 authored by Jonas Karlman's avatar Jonas Karlman Committed by Tom Rini
Browse files

phy: Fix generic_setup_phy() return value on power on failure



generic_phy_exit() typically return 0 for a struct phy that has been
initialized with a generic_phy_init() call.

generic_setup_phy() returns the value from a generic_phy_exit() call
when generic_phy_power_on() fails. This hides the failed state of the
power_on ops from the caller of generic_setup_phy().

Fix this by ignoring the return value of the generic_phy_exit() call and
return the value from the generic_phy_power_on() call.

Fixes: 84e56140 ("phy: Add generic_{setup,shutdown}_phy() helpers")
Signed-off-by: default avatarJonas Karlman <jonas@kwiboo.se>
parent 3b4e6e94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment