diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2024-06-06 10:37:03 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2024-06-17 10:33:30 +0200 |
commit | 8f773bfbdd428819328a2d185976cfc6ae811cd3 (patch) | |
tree | 843de7da624d6df1e1b283719d78e19e4c22fcff /tools/perf/scripts/python/export-to-sqlite.py | |
parent | ae1cf4759972c5fe665ee4c5e0c29de66fe3cf4a (diff) |
pinctrl: single: 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 call pcs_free_resources() if pinctrl_enable() fails.
Fixes: 5038a66dad01 ("pinctrl: core: delete incorrect free in pinctrl_enable()")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240606023704.3931561-3-yangyingliang@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions