Commit bab7834c authored by Lifeng Zheng's avatar Lifeng Zheng Committed by Chanwoo Choi
Browse files

PM / devfreq: Check governor before using governor->name



Commit 96ffcdf2 ("PM / devfreq: Remove redundant governor_name from
struct devfreq") removes governor_name and uses governor->name to replace
it. But devfreq->governor may be NULL and directly using
devfreq->governor->name may cause null pointer exception. Move the check of
governor to before using governor->name.

Fixes: 96ffcdf2 ("PM / devfreq: Remove redundant governor_name from struct devfreq")
Signed-off-by: default avatarLifeng Zheng <zhenglifeng1@huawei.com>
Link: https://lore.kernel.org/lkml/20250421030020.3108405-5-zhenglifeng1@huawei.com/


Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent a98d3680
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment