[PATCH] net: ftgmac100: use bus name in mdio error messages

Tom Rini trini at konsulko.com
Mon Aug 8 21:08:06 CEST 2022


On Tue, May 17, 2022 at 03:16:39PM -0700, Zev Weiss wrote:

> Previously we'd been using a device name retrieved via
> ftgmac100_data->phydev, but the mdio read/write functions may be
> called before that member is initialized in ftgmac100_phy_init(),
> leading to a NULL pointer dereference while printing the error message
> issued if the mdio access fails.  We can instead use bus->name, which
> is already available at that point.
> 
> Signed-off-by: Zev Weiss <zev at bewilderbeest.net>
> Fixes: 538e75d3fc54 ("net: ftgmac100: add MDIO bus and phylib support")
> Reviewed-by: Cédric Le Goater <clg at kaod.org>

Applied to u-boot/master, 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/20220808/a191cd22/attachment.sig>


More information about the U-Boot mailing list