Commit 87b9f086 authored by Zhongqiu Han's avatar Zhongqiu Han Committed by Greg Kroah-Hartman
Browse files

pm: cpupower: bench: Prevent NULL dereference on malloc failure

[ Upstream commit 208baa3e ]

If malloc returns NULL due to low memory, 'config' pointer can be NULL.
Add a check to prevent NULL dereference.

Link: https://lore.kernel.org/r/20250219122715.3892223-1-quic_zhonhan@quicinc.com


Signed-off-by: default avatarZhongqiu Han <quic_zhonhan@quicinc.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent eda58658
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment