diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index bc11cdd2e4f2..e16a60872226 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -692,6 +692,7 @@ static int __w1_attach_slave_device(struct w1_slave *sl) dev_err(&sl->dev, "Device registration [%s] failed. err=%d\n", dev_name(&sl->dev), err); + of_node_put(sl->dev.of_node); put_device(&sl->dev); return err; }