Skip to content

Commit 68d6c84

Browse files
Yuuoniybroonie
authored andcommitted
regulator: scmi: Fix refcount leak in scmi_regulator_probe
of_find_node_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: 0fbeae7 ("regulator: add SCMI driver") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220516074433.32433-1-linmq006@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent afaa7b9 commit 68d6c84

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/regulator/scmi-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static int scmi_regulator_probe(struct scmi_device *sdev)
352352
return ret;
353353
}
354354
}
355-
355+
of_node_put(np);
356356
/*
357357
* Register a regulator for each valid regulator-DT-entry that we
358358
* can successfully reach via SCMI and has a valid associated voltage

0 commit comments

Comments
 (0)