Commit 6d2742cf authored by 倪琛's avatar 倪琛 Committed by Zheng Zengkai
Browse files

pinctrl: stm32: Add check for devm_kcalloc

stable inclusion
from stable-v6.6.5
commit 3e3fa8056fd259f34e6f0c02b54d17893114c909
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8N21P

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3e3fa8056fd259f34e6f0c02b54d17893114c909



--------------------------------

[ Upstream commit b0eeba527e704d6023a6cd9103f929226e326b03 ]

Add check for the return value of devm_kcalloc() and return the error
if it fails in order to avoid NULL pointer dereference.

Fixes: 32c170ff ("pinctrl: stm32: set default gpio line names using pin names")
Signed-off-by: default avatarChen Ni <nichen@iscas.ac.cn>
Acked-by: default avatarValentin Caron <valentin.caron@foss.st.com>
Link: https://lore.kernel.org/r/20231031080807.3600656-1-nichen@iscas.ac.cn


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent c0df2cef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment