mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-26 11:41:06 +02:00
ar71xx: fix NULL pointer dereference in the ethernet driver
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18755 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
51528b3785
commit
1e52fbecdb
@ -309,9 +309,11 @@ int ag71xx_phy_connect(struct ag71xx *ag)
|
||||
}
|
||||
|
||||
/* Reset the mdio bus explicitly */
|
||||
mutex_lock(&ag->mii_bus->mdio_lock);
|
||||
ag->mii_bus->reset(ag->mii_bus);
|
||||
mutex_unlock(&ag->mii_bus->mdio_lock);
|
||||
if (ag->mii_bus->reset) {
|
||||
mutex_lock(&ag->mii_bus->mdio_lock);
|
||||
ag->mii_bus->reset(ag->mii_bus);
|
||||
mutex_unlock(&ag->mii_bus->mdio_lock);
|
||||
}
|
||||
|
||||
if (pdata->phy_mask)
|
||||
return ag71xx_phy_connect_multi(ag);
|
||||
|
Loading…
x
Reference in New Issue
Block a user