1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-10-04 03:46:22 +03: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:
juhosg 2009-12-11 19:32:58 +00:00
parent 51528b3785
commit 1e52fbecdb

View File

@ -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);