diff options
author | Arnd Bergmann <arnd@arndb.de> | 2022-05-27 23:19:46 +0300 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2022-05-27 23:19:48 +0300 |
commit | 4a4e81ddb8b0eb412bcfb90c24ba0d5d0d913483 (patch) | |
tree | b91fe609f7117aaf88d0ac4dc7cb741e7c6b71ca | |
parent | 6fe1953e008d0225fea9ad14ab52bd5faaea6c95 (diff) | |
parent | 9b59588d8be91c96bfb0371e912ceb4f16315dbf (diff) | |
download | linux-4a4e81ddb8b0eb412bcfb90c24ba0d5d0d913483.tar.xz |
Merge tag 'v5.19-rockchip-drivers2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/late
Refcount leak for a used of-node in the grf-init.
* tag 'v5.19-rockchip-drivers2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
soc: rockchip: Fix refcount leak in rockchip_grf_init
Link: https://lore.kernel.org/r/4541398.Icojqenx9y@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | drivers/soc/rockchip/grf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/soc/rockchip/grf.c b/drivers/soc/rockchip/grf.c index 384461b70684..15a3970e3509 100644 --- a/drivers/soc/rockchip/grf.c +++ b/drivers/soc/rockchip/grf.c @@ -165,12 +165,14 @@ static int __init rockchip_grf_init(void) return -ENODEV; if (!match || !match->data) { pr_err("%s: missing grf data\n", __func__); + of_node_put(np); return -EINVAL; } grf_info = match->data; grf = syscon_node_to_regmap(np); + of_node_put(np); if (IS_ERR(grf)) { pr_err("%s: could not get grf syscon\n", __func__); return PTR_ERR(grf); |