Commit a7161d4e authored by Haowen Bai's avatar Haowen Bai Committed by Zheng Zengkai
Browse files

pinctrl: aspeed: Fix potential NULL dereference in aspeed_pinmux_set_mux()

stable inclusion
from stable-v5.10.132
commit ef1e38532f4b2f0f3b460e938a2e7076c3bed5ee
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5YS3T

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



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

[ Upstream commit 84a85d3f ]

pdesc could be null but still dereference pdesc->name and it will lead to
a null pointer access. So we move a null check before dereference.

Signed-off-by: default avatarHaowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1650508019-22554-1-git-send-email-baihaowen@meizu.com


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>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent 76d964e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment