[PATCH v2 1/3] phy: Fix generic_setup_phy() return value on power on failure

Tom Rini trini at konsulko.com
Thu Sep 14 00:04:14 CEST 2023


On Thu, Aug 31, 2023 at 11:07:08PM +0000, Jonas Karlman wrote:

> 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: 84e561407a5f ("phy: Add generic_{setup,shutdown}_phy() helpers")
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230913/0cb65ddb/attachment.sig>


More information about the U-Boot mailing list