[PATCH 1/6] phy: Set phy->dev to NULL when generic_phy_get_by_name() fails

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


On Thu, Aug 31, 2023 at 10:16:33PM +0000, Jonas Karlman wrote:

> generic_phy_get_by_name() does not initialize phy->dev to NULL before
> returning when dev_read_stringlist_search() fails. This can lead to an
> uninitialized or reused struct phy erroneously be report as valid by
> generic_phy_valid().
> 
> Fix this issue by initializing phy->dev to NULL, also extend the
> dm_test_phy_base test with calls to generic_phy_valid().
> 
> Fixes: b9688df3cbf4 ("drivers: phy: Set phy->dev to NULL when generic_phy_get_by_index() fails")
> Fixes: 868d58f69c7c ("usb: dwc3: Fix non-usb3 configurations")
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>

For the series, 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/952ad0f0/attachment.sig>


More information about the U-Boot mailing list