Commit c09ac191 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Linus Walleij

pinctrl: nomadik: Add missing of_node_put() in nmk_pinctrl_probe

This node pointer is returned by of_parse_phandle() with refcount
incremented in this function. Calling of_node_put() to avoid
the refcount leak.

Fixes: 32e67eee ("pinctrl: nomadik: Allow prcm_base to be extracted from Device Tree")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220307115116.25316-1-linmq006@gmail.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent de845036
......@@ -1883,8 +1883,10 @@ static int nmk_pinctrl_probe(struct platform_device *pdev)
}
prcm_np = of_parse_phandle(np, "prcm", 0);
if (prcm_np)
if (prcm_np) {
npct->prcm_base = of_iomap(prcm_np, 0);
of_node_put(prcm_np);
}
if (!npct->prcm_base) {
if (version == PINCTRL_NMK_STN8815) {
dev_info(&pdev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment