mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-18 16:40:29 +00:00
ar8216: add adjust_link checking
Driver crash when 'phydev->adjust_link' isn't provided. This patch check if 'phydev->adjust_link' exist before call the method. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
This commit is contained in:
parent
ed25e3ac02
commit
e61812fd34
@ -2104,7 +2104,8 @@ ar8xxx_phy_read_status(struct phy_device *phydev)
|
||||
|
||||
phydev->state = PHY_RUNNING;
|
||||
netif_carrier_on(phydev->attached_dev);
|
||||
phydev->adjust_link(phydev->attached_dev);
|
||||
if (phydev->adjust_link)
|
||||
phydev->adjust_link(phydev->attached_dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user