Message ID | 20220129160947.11434-1-marek.behun@nic.cz |
---|---|
State | New |
Headers | show |
Series | [4.19] net: sfp: ignore disabled SFP node | expand |
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index e808efd76212..e0e175c691d4 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -554,6 +554,11 @@ static int phylink_register_sfp(struct phylink *pl, return ret; } + if (!fwnode_device_is_available(ref.fwnode)) { + fwnode_handle_put(ref.fwnode); + return 0; + } + pl->sfp_bus = sfp_register_upstream(ref.fwnode, pl->netdev, pl, &sfp_phylink_ops); if (!pl->sfp_bus)