Message ID | 20221125070156.3535855-1-zhangpeng362@huawei.com |
---|---|
State | Accepted |
Commit | 5ead93289815a075d43c415e35c8beafafb801c9 |
Headers | show |
Series | pinctrl: pinconf-generic: add missing of_node_put() in pinconf_generic_dt_node_to_map() | expand |
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c index 415d1df8f46a..365c4b0ca465 100644 --- a/drivers/pinctrl/pinconf-generic.c +++ b/drivers/pinctrl/pinconf-generic.c @@ -395,8 +395,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;