diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index c89b8c63f16a..69adc0aa141c 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -506,6 +506,9 @@ static int phylink_register_sfp(struct phylink *pl, struct fwnode_reference_args ref; int ret; + if (!fwnode) + return 0; + ret = fwnode_property_get_reference_args(fwnode, "sfp", NULL, 0, 0, &ref); if (ret < 0) {