]> git.baikalelectronics.ru Git - uboot.git/commit
net: ftgmac100: use bus name in mdio error messages
authorZev Weiss <zev@bewilderbeest.net>
Tue, 17 May 2022 22:16:39 +0000 (15:16 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 8 Aug 2022 14:50:20 +0000 (10:50 -0400)
commit3777fc645927401e0dbabf2d0eedd5121e3e4dbc
tree2ed698d70b8f429af7641ad6468a62482c1d9999
parent3076dae547a652568925dcabd73f5ffed49aff03
net: ftgmac100: use bus name in mdio error messages

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@bewilderbeest.net>
Fixes: 0dd2ef6b54ce ("net: ftgmac100: add MDIO bus and phylib support")
Reviewed-by: Cédric Le Goater <clg@kaod.org>
drivers/net/ftgmac100.c