1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-01-04 02:37:10 +01:00
Files
u-boot-megous/test/dm
Jonas Karlman 14639bf14d phy: Set phy->dev to NULL when generic_phy_get_by_index_nodev() fails
Generic phy helpers typically use generic_phy_valid() to determine if
the helper should perform its function on a passed struct phy.
generic_phy_valid() treat any struct phy having phy->dev set as valid.

With generic_phy_get_by_index_nodev() setting phy->dev to a valid struct
udevice early, there can be situations where the struct phy is returned
as valid when initialization in fact failed and returned an error.

Fix this by setting phy->dev back to NULL when any of the calls to
of_xlate ops, device_get_supply_regulator or phy_alloc_counts fail. Also
extend the dm_test_phy_base test with a test where of_xlate ops fail.

Fixes: 72e5016f87 ("drivers: phy: add generic PHY framework")
Fixes: b9688df3cb ("drivers: phy: Set phy->dev to NULL when generic_phy_get_by_index() fails")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2023-09-13 15:52:20 -04:00
..
2022-01-19 18:11:34 +01:00
2023-05-13 09:52:32 -04:00
2023-04-05 10:54:47 -04:00
2021-01-30 14:25:41 -07:00
2021-09-28 18:50:56 +03:00
2023-05-02 14:23:58 -04:00
2022-04-25 10:00:03 -04:00
2021-10-13 14:18:30 -07:00
2022-10-05 08:43:53 +02:00
2023-01-05 19:21:56 -07:00
2022-10-20 15:22:30 +08:00
2022-04-28 09:26:44 -04:00
2022-10-26 15:21:11 -04:00
2023-01-05 19:21:56 -07:00
2022-09-25 13:59:56 -06:00
2022-04-14 15:39:15 -04:00
2021-03-27 15:04:31 +13:00
2021-09-30 08:08:56 -04:00
2023-01-05 19:21:56 -07:00
2021-05-04 07:57:18 -04:00
2020-11-05 09:11:30 -07:00
2022-04-23 22:05:34 +02:00
2021-02-16 11:48:20 -05:00
2021-09-25 09:46:15 -06:00
2023-07-20 14:10:57 -06:00