Commit 208baa3e authored by Zhongqiu Han's avatar Zhongqiu Han Committed by Shuah Khan
Browse files

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

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