Fix a kernel crash caused when CONFIG_FIXED_PHY used for fixed phy drivers
in phy-add-aneg-done-function patch.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
{
int status;
-+ if (phydev->drv->update_link)
++ if (phydev->drv && phydev->drv->update_link)
+ return phydev->drv->update_link(phydev);
+
/* Do a fake read */
{
int status;
-+ if (phydev->drv->update_link)
++ if (phydev->drv && phydev->drv->update_link)
+ return phydev->drv->update_link(phydev);
+
/* Do a fake read */
{
int status;
-+ if (phydev->drv->update_link)
++ if (phydev->drv && phydev->drv->update_link)
+ return phydev->drv->update_link(phydev);
+
/* Do a fake read */