Commit 9b401f4a authored by Yang Yingliang's avatar Yang Yingliang Committed by Linus Walleij
Browse files

pinctrl: ti: ti-iodelay: fix possible memory leak when pinctrl_enable() fails



This driver calls pinctrl_register_and_init() which is not
devm_ managed, it will leads memory leak if pinctrl_enable()
fails. Replace it with devm_pinctrl_register_and_init().
And add missing of_node_put() in the error path.

Fixes: 5038a66d ("pinctrl: core: delete incorrect free in pinctrl_enable()")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240606023704.3931561-4-yangyingliang@huawei.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 8f773bfb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment