Skip to content
Commit 61b3c876 authored by Liang He's avatar Liang He Committed by Krzysztof Kozlowski
Browse files

memory: pl353-smc: Fix refcount leak bug in pl353_smc_probe()



The break of for_each_available_child_of_node() needs a
corresponding of_node_put() when the reference 'child' is not
used anymore. Here we do not need to call of_node_put() in
fail path as '!match' means no break.

While the of_platform_device_create() will created a new
reference by 'child' but it has considered the refcounting.

Fixes: fee10bd2 ("memory: pl353: Add driver for arm pl353 static memory controller")
Signed-off-by: default avatarLiang He <windhl@126.com>
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220716031324.447680-1-windhl@126.com
parent 568035b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment