Skip to content

Commit 19bbb49

Browse files
windhlUlf Hansson
authored andcommitted
mmc: cavium-octeon: Add of_node_put() when breaking out of loop
In octeon_mmc_probe(), we should call of_node_put() when breaking out of for_each_child_of_node() which has increased and decreased the refcount during each iteration. Fixes: 01d9584 ("mmc: cavium: Add MMC support for Octeon SOCs.") Signed-off-by: Liang He <windhl@126.com> Acked-by: Robert Richter <rric@kernel.org> Link: https://lore.kernel.org/r/20220719095216.1241601-1-windhl@126.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 883c1d6 commit 19bbb49

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/mmc/host/cavium-octeon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ static int octeon_mmc_probe(struct platform_device *pdev)
277277
if (ret) {
278278
dev_err(&pdev->dev, "Error populating slots\n");
279279
octeon_mmc_set_shared_power(host, 0);
280+
of_node_put(cn);
280281
goto error;
281282
}
282283
i++;

0 commit comments

Comments
 (0)