+11
−1
Loading
stable inclusion from stable-v4.19.320 commit 636f8fe03a14b0994a3dbdc05c8fa8c8296c1357 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAY9KE CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=636f8fe03a14b0994a3dbdc05c8fa8c8296c1357 ------------------------------------------------------------------- [ Upstream commit ae1cf4759972c5fe665ee4c5e0c29de66fe3cf4a ] In devm_pinctrl_register(), if pinctrl_enable() fails in pinctrl_register(), the "pctldev" has not been added to dev resources, so devm_pinctrl_dev_release() can not be called, it leads memory leak. Introduce pinctrl_uninit_controller(), call it in the error path to free memory. 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-2-yangyingliang@huawei.com Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Zhang Zekun <zhangzekun11@huawei.com>