Loading
pinctrl: apple: check devm_kasprintf() returned value
stable inclusion from stable-v6.6.58 commit fad940e2dd789155f99ecafa71a7baf6f96530bc category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB3BSC Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fad940e2dd789155f99ecafa71a7baf6f96530bc -------------------------------- commit 665a58fe663ac7a9ea618dc0b29881649324b116 upstream. devm_kasprintf() can return a NULL pointer on failure but this returned value is not checked. Fix this lack and check the returned value. Found by code review. Cc: stable@vger.kernel.org Fixes: a0f160ff ("pinctrl: add pinctrl/GPIO driver for Apple SoCs") Signed-off-by:Ma Ke <make24@iscas.ac.cn> Reviewed-by:
Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/20240905020917.356534-1-make24@iscas.ac.cn Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Wen Zhiwei <wenzhiwei@kylinos.cn>