mirror of
https://xff.cz/git/u-boot/
synced 2025-08-31 00:02:13 +02:00
include: phy: fix NULL pointer check in phy_write()
phy_write() uses bus->write() instead of bus->read(). This means NULL pointer pre-check needs to happen on bus->write instead of bus->read. Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
committed by
Tom Rini
parent
a8a71c9488
commit
7def4e621b
@@ -205,7 +205,7 @@ static inline int phy_write(struct phy_device *phydev, int devad, int regnum,
|
||||
{
|
||||
struct mii_dev *bus = phydev->bus;
|
||||
|
||||
if (!bus || !bus->read) {
|
||||
if (!bus || !bus->write) {
|
||||
debug("%s: No bus configured\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user