projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8a71c9
)
include: phy: fix NULL pointer check in phy_write()
author
Thirupathaiah Annapureddy
<thiruan@linux.microsoft.com>
Tue, 18 Aug 2020 00:31:08 +0000
(17:31 -0700)
committer
Tom Rini
<trini@konsulko.com>
Wed, 16 Sep 2020 20:54:00 +0000
(16:54 -0400)
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>
include/phy.h
patch
|
blob
|
history
diff --git
a/include/phy.h
b/include/phy.h
index 1dbbf651113845a8cf16fa31c022b81f72fddd23..cbdb10d6fced9dfc45a5e4297228449bd2fbbca7 100644
(file)
--- a/
include/phy.h
+++ b/
include/phy.h
@@
-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;
}