Skip to content
Snippets Groups Projects
Commit 3f526ea6 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Greg Kroah-Hartman
Browse files

memory: atmel-ebi: add missing of_node_put for loop iteration


[ Upstream commit 907c5bbb ]

Early exits from for_each_available_child_of_node() should decrement the
node reference counter.  Reported by Coccinelle:

  drivers/memory/atmel-ebi.c:593:1-33: WARNING:
    Function "for_each_available_child_of_node" should have of_node_put() before return around line 604.

Fixes: 6a4ec4cd ("memory: add Atmel EBI (External Bus Interface) driver")
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210423101815.119341-2-krzysztof.kozlowski@canonical.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 84fa4a10
No related branches found
No related tags found
No related merge requests found
...@@ -600,8 +600,10 @@ static int atmel_ebi_probe(struct platform_device *pdev) ...@@ -600,8 +600,10 @@ static int atmel_ebi_probe(struct platform_device *pdev)
child); child);
ret = atmel_ebi_dev_disable(ebi, child); ret = atmel_ebi_dev_disable(ebi, child);
if (ret) if (ret) {
of_node_put(child);
return ret; return ret;
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment