mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
pinctrl: pinconf-generic: add missing of_node_put()
[ Upstream commit 5ead93289815a075d43c415e35c8beafafb801c9 ]
of_node_put() needs to be called when jumping out of the loop, since
for_each_available_child_of_node() will increase the refcount of node.
Fixes: c7289500e2 ("pinctrl: pinconf-generic: scan also referenced phandle node")
Signed-off-by: ZhangPeng <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
ffd53b7892
commit
3359f8d533
1 changed files with 3 additions and 1 deletions
|
|
@ -391,8 +391,10 @@ int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
for_each_available_child_of_node(np_config, np) {
|
||||
ret = pinconf_generic_dt_subnode_to_map(pctldev, np, map,
|
||||
&reserved_maps, num_maps, type);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
of_node_put(np);
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue