Commit 64761c0a authored by Yang Yingliang's avatar Yang Yingliang Committed by Zheng Zengkai
Browse files

clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource()

stable inclusion
from stable-v5.10.114
commit ee71b47da599d7d0715ece34dca9e4f7822cf87f
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5IY1V

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



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

[ Upstream commit f58ca215 ]

It will cause null-ptr-deref if platform_get_resource() returns NULL,
we need check the return value.

Fixes: 7a6fca87 ("clk: sunxi: Add driver for A80 MMC config clocks/resets")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarSamuel Holland <samuel@sholland.org>
Signed-off-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220421134308.2885094-1-yangyingliang@huawei.com


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 42e58f66
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment