summaryrefslogtreecommitdiffstats
path: root/drivers/soc/samsung
diff options
context:
space:
mode:
authorNishka Dasgupta <nishkadg.linux@gmail.com>2019-08-15 08:13:54 +0200
committerGeert Uytterhoeven <geert+renesas@glider.be>2019-08-19 14:56:14 +0200
commitda51ceda8ab054bf3b4c5cf86a8deec7d7849a5c (patch)
treee629a5b0badaaf10590010cbb38a8841e6fbfb07 /drivers/soc/samsung
parentsoc: renesas: rcar-sysc: Use [] to denote a flexible array member (diff)
downloadlinux-da51ceda8ab054bf3b4c5cf86a8deec7d7849a5c.tar.xz
linux-da51ceda8ab054bf3b4c5cf86a8deec7d7849a5c.zip
soc: renesas: rcar-sysc: Add goto to of_node_put() before return
The local variable np in function rcar_sysc_pd_init takes the return value of of_find_matching_node_and_match(), which gets a node but does not put it. If np is not put before the function returns, it may cause a memory leak. Hence, remove the return statement that does not immediately follow a putting of np. Replace it with a goto pointing to a pre-existing label that first puts np and then returns the required value. Issue found with Coccinelle. Fixes: afa6f53df6052968 ("soc: renesas: rcar-sysc: Add support for fixing up power area tables") Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'drivers/soc/samsung')
0 files changed, 0 insertions, 0 deletions