Commit af35355e authored by 蒋家盛's avatar 蒋家盛 Committed by Zhang Zekun
Browse files

clk: mediatek: clk-mt2701: Add check for mtk_alloc_clk_data

stable inclusion
from stable-v4.19.299
commit 1953e62366da5460dc712e045f94fb0d8918999d
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9RFJQ
CVE: CVE-2023-52875

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



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

[ Upstream commit 0d6e24b422a2166a9297a8286ff2e6ab9a5e8cd3 ]

Add the check for the return value of mtk_alloc_clk_data() in order to
avoid NULL pointer dereference.

Fixes: e9862118 ("clk: mediatek: Add MT2701 clock support")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20230901024658.23405-1-jiasheng@iscas.ac.cn


Reviewed-by: default avatarMarkus Schneider-Pargmann <msp@baylibre.com>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZhang Zekun <zhangzekun11@huawei.com>
parent f5fda1e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment