You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
soc: amlogic: Fix refcount leak in meson-secure-pwrc.c
[ Upstream commitd18529a4c1] In meson_secure_pwrc_probe(), there is a refcount leak in one fail path. Signed-off-by: Liang He <windhl@126.com> Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Fixes:b3dde5013e("soc: amlogic: Add support for Secure power domains controller") Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://lore.kernel.org/r/20220616144915.3988071-1-windhl@126.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6cd8ba0c0b
commit
80c469e63b
@@ -138,8 +138,10 @@ static int meson_secure_pwrc_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
pwrc = devm_kzalloc(&pdev->dev, sizeof(*pwrc), GFP_KERNEL);
|
||||
if (!pwrc)
|
||||
if (!pwrc) {
|
||||
of_node_put(sm_np);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
pwrc->fw = meson_sm_get(sm_np);
|
||||
of_node_put(sm_np);
|
||||
|
||||
Reference in New Issue
Block a user