]> git.itanic.dy.fi Git - linux-stable/commit
soc: brcmstb: pm-arm: Fix refcount leak and __iomem leak bugs
authorLiang He <windhl@126.com>
Thu, 7 Jul 2022 01:56:20 +0000 (09:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 09:30:04 +0000 (11:30 +0200)
commit43245c77d9efd8c9eb91bf225d07954dcf32204d
treeee743667e3df93cc4fbeb0ffdc745dd2b3c57dd4
parentd3eb252d763618fc7ba478fcbd548f455b3f85b2
soc: brcmstb: pm-arm: Fix refcount leak and __iomem leak bugs

[ Upstream commit 1085f5080647f0c9f357c270a537869191f7f2a1 ]

In brcmstb_pm_probe(), there are two kinds of leak bugs:

(1) we need to add of_node_put() when for_each__matching_node() breaks
(2) we need to add iounmap() for each iomap in fail path

Fixes: 0b741b8234c8 ("soc: bcm: brcmstb: Add support for S2/S3/S5 suspend states (ARM)")
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220707015620.306468-1-windhl@126.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/bcm/brcmstb/pm/pm-arm.c