Skip to content

Commit 19bbb49

Browse files
windhlstorulf
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 <[email protected]> Acked-by: Robert Richter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 883c1d6 commit 19bbb49

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)