summaryrefslogtreecommitdiff
path: root/drivers/soc/amlogic/meson-secure-pwrc.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2022-07-01 22:22:56 +0200
committerArnd Bergmann <arnd@arndb.de>2022-07-01 22:22:57 +0200
commitaa61fa3e36cf9298ac647e2f10298839413a9403 (patch)
tree7be2440a5cb0d99908d39cab98a8510f712f1753 /drivers/soc/amlogic/meson-secure-pwrc.c
parent92a1691b9db8d5191009e833f104551d3438496c (diff)
parentd18529a4c12f66d83daac78045ea54063bd43257 (diff)
Merge tag 'amlogic-drivers-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/drivers
Amlogic Drivers changes for v5.20: - Fix refcount leak in meson-secure-pwrc.c - Fix refcount leak in meson_mx_socinfo_init * tag 'amlogic-drivers-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: soc: amlogic: Fix refcount leak in meson-secure-pwrc.c meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init Link: https://lore.kernel.org/r/0c01e173-9abf-69ac-7882-e6ecc3935c33@baylibre.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/soc/amlogic/meson-secure-pwrc.c')
-rw-r--r--drivers/soc/amlogic/meson-secure-pwrc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c
index a10a417a87db..e93518763526 100644
--- a/drivers/soc/amlogic/meson-secure-pwrc.c
+++ b/drivers/soc/amlogic/meson-secure-pwrc.c
@@ -152,8 +152,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);