pinctrl/rockchip: Add missing of_node_put() in rockchip_pinctrl_probe
[ Upstream commit 89388f8730699c259f8090ec435fb43569efe4ac ] The device_node pointer is returned by of_parse_phandle() with refcount incremented. We should use of_node_put() on it when done. Fixes:1e747e59cc
("pinctrl: rockchip: base regmap supplied by a syscon") Fixes:14dee8677e
("pinctrl: rockchip: let pmu registers be supplied by a syscon") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220307120234.28657-1-linmq006@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
bc1e29a351
commit
0615a444c5
@ -3433,6 +3433,7 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
|
|||||||
node = of_parse_phandle(np, "rockchip,grf", 0);
|
node = of_parse_phandle(np, "rockchip,grf", 0);
|
||||||
if (node) {
|
if (node) {
|
||||||
info->regmap_base = syscon_node_to_regmap(node);
|
info->regmap_base = syscon_node_to_regmap(node);
|
||||||
|
of_node_put(node);
|
||||||
if (IS_ERR(info->regmap_base))
|
if (IS_ERR(info->regmap_base))
|
||||||
return PTR_ERR(info->regmap_base);
|
return PTR_ERR(info->regmap_base);
|
||||||
} else {
|
} else {
|
||||||
@ -3469,6 +3470,7 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
|
|||||||
node = of_parse_phandle(np, "rockchip,pmu", 0);
|
node = of_parse_phandle(np, "rockchip,pmu", 0);
|
||||||
if (node) {
|
if (node) {
|
||||||
info->regmap_pmu = syscon_node_to_regmap(node);
|
info->regmap_pmu = syscon_node_to_regmap(node);
|
||||||
|
of_node_put(node);
|
||||||
if (IS_ERR(info->regmap_pmu))
|
if (IS_ERR(info->regmap_pmu))
|
||||||
return PTR_ERR(info->regmap_pmu);
|
return PTR_ERR(info->regmap_pmu);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user