]> git.baikalelectronics.ru Git - kernel.git/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)
committerFlorian Fainelli <f.fainelli@gmail.com>
Mon, 29 Aug 2022 17:30:22 +0000 (10:30 -0700)
commitaa4fc77e32f1d1ab19500e15acf947856fb433cb
treeef372b19257150ea14782fb1517af4a7e722de4a
parent3d7dcb2c5450a57f60c448f42be48fdfe456bfdf
soc: brcmstb: pm-arm: Fix refcount leak and __iomem leak bugs

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: bb5961f0804b ("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>
drivers/soc/bcm/brcmstb/pm/pm-arm.c