--- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -3414,7 +3414,7 @@ void set_primary_fwnode(struct device *d if (fwnode_is_primary(fn)) { dev->fwnode = fn->secondary; if (!(parent && fn == parent->fwnode)) - fn->secondary = ERR_PTR(-ENODEV); + fn->secondary = NULL; } else { dev->fwnode = NULL; }