未验证 提交 4a4e81dd 编写于 作者: A Arnd Bergmann

Merge tag 'v5.19-rockchip-drivers2' of...

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@philSigned-off-by: NArnd Bergmann <arnd@arndb.de>
...@@ -165,12 +165,14 @@ static int __init rockchip_grf_init(void) ...@@ -165,12 +165,14 @@ static int __init rockchip_grf_init(void)
return -ENODEV; return -ENODEV;
if (!match || !match->data) { if (!match || !match->data) {
pr_err("%s: missing grf data\n", __func__); pr_err("%s: missing grf data\n", __func__);
of_node_put(np);
return -EINVAL; return -EINVAL;
} }
grf_info = match->data; grf_info = match->data;
grf = syscon_node_to_regmap(np); grf = syscon_node_to_regmap(np);
of_node_put(np);
if (IS_ERR(grf)) { if (IS_ERR(grf)) {
pr_err("%s: could not get grf syscon\n", __func__); pr_err("%s: could not get grf syscon\n", __func__);
return PTR_ERR(grf); return PTR_ERR(grf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册