mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00: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:
parent
a8a71c9488
commit
7def4e621b
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue