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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent afaa7b9 commit 68d6c84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)