projects
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5dbfc8
)
net: phy: the NC-SI phy device do not require mdio bus
author
Jacky Chou
<jacky_chou@aspeedtech.com>
Mon, 15 Jan 2024 10:34:47 +0000
(18:34 +0800)
committer
Tom Rini
<trini@konsulko.com>
Tue, 26 Mar 2024 23:58:26 +0000
(19:58 -0400)
As with fixed-link phy device, the NC-SI phy devive does not
require an mdio bus. So, a condition is added to check the
NC-SI phy id to avoid accessing the bus pointer that is NULL.
Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
drivers/net/phy/phy.c
patch
|
blob
|
history
diff --git
a/drivers/net/phy/phy.c
b/drivers/net/phy/phy.c
index f39ca942f6b315a266d632c1cb94d32715c645af..9cec04a0c94191668c298da668abe73cdca1603c 100644
(file)
--- a/
drivers/net/phy/phy.c
+++ b/
drivers/net/phy/phy.c
@@
-566,7
+566,8
@@
struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
return NULL;
}
- if (addr >= 0 && addr < PHY_MAX_ADDR && phy_id != PHY_FIXED_ID)
+ if (addr >= 0 && addr < PHY_MAX_ADDR && phy_id != PHY_FIXED_ID &&
+ phy_id != PHY_NCSI_ID)
bus->phymap[addr] = dev;
return dev;