kernel: fix phy aneg crash
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>
This commit is contained in:
parent
11eac705c5
commit
08371a2db7
@ -19,7 +19,7 @@
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
+ if (phydev->drv->update_link)
|
+ if (phydev->drv && phydev->drv->update_link)
|
||||||
+ return phydev->drv->update_link(phydev);
|
+ return phydev->drv->update_link(phydev);
|
||||||
+
|
+
|
||||||
/* Do a fake read */
|
/* Do a fake read */
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
+ if (phydev->drv->update_link)
|
+ if (phydev->drv && phydev->drv->update_link)
|
||||||
+ return phydev->drv->update_link(phydev);
|
+ return phydev->drv->update_link(phydev);
|
||||||
+
|
+
|
||||||
/* Do a fake read */
|
/* Do a fake read */
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
+ if (phydev->drv->update_link)
|
+ if (phydev->drv && phydev->drv->update_link)
|
||||||
+ return phydev->drv->update_link(phydev);
|
+ return phydev->drv->update_link(phydev);
|
||||||
+
|
+
|
||||||
/* Do a fake read */
|
/* Do a fake read */
|
||||||
|
Loading…
Reference in New Issue
Block a user