diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c index 55943b4dcc7b..0037e2bdacd6 100644 --- a/drivers/hwmon/ina3221.c +++ b/drivers/hwmon/ina3221.c @@ -713,8 +713,10 @@ static int ina3221_probe_from_dt(struct device *dev, struct ina3221_data *ina) for_each_child_of_node(np, child) { ret = ina3221_probe_child_from_dt(dev, child, ina); - if (ret) + if (ret) { + of_node_put(child); return ret; + } } return 0;