mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-27 18:00:48 +07:00
net: phylink: fix failure to register on x86 systems
The kernel test robot reports a boot failure with qemu in 5.5-rc, referencing commit2203cbf2c8
("net: sfp: move fwnode parsing into sfp-bus layer"). This is caused by phylink_create() being passed a NULL fwnode, causing fwnode_property_get_reference_args() to return -EINVAL. Don't attempt to attach to a SFP bus if we have no fwnode, which avoids this issue. Reported-by: kernel test robot <rong.a.chen@intel.com> Fixes:2203cbf2c8
("net: sfp: move fwnode parsing into sfp-bus layer") Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e64b274c95
commit
eed70fd945
@ -566,6 +566,9 @@ static int phylink_register_sfp(struct phylink *pl,
|
||||
struct sfp_bus *bus;
|
||||
int ret;
|
||||
|
||||
if (!fwnode)
|
||||
return 0;
|
||||
|
||||
bus = sfp_bus_find_fwnode(fwnode);
|
||||
if (IS_ERR(bus)) {
|
||||
ret = PTR_ERR(bus);
|
||||
|
Loading…
Reference in New Issue
Block a user