]> git.baikalelectronics.ru Git - kernel.git/commit
net: phylink: fix failure to register on x86 systems
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 3 Jan 2020 15:13:56 +0000 (15:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jan 2020 20:37:55 +0000 (12:37 -0800)
commit57d39a55798403c31be36dc4bbc53fc8dfc1e387
tree3a575aaaef80981a86ca7f9b6b609bda1a791e26
parente42065c1093b88236ad8a9a5b1be104ffb0e6418
net: phylink: fix failure to register on x86 systems

The kernel test robot reports a boot failure with qemu in 5.5-rc,
referencing commit 91bdda95cff2 ("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: 91bdda95cff2 ("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>
drivers/net/phy/phylink.c