Skip to content
Commit f44bf737 authored by Zev Weiss's avatar Zev Weiss Committed by Tom Rini
Browse files

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: default avatarZev Weiss <zev@bewilderbeest.net>
Fixes: 538e75d3 ("net: ftgmac100: add MDIO bus and phylib support")
Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
parent 52503d81
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment