From b5fbcbb9462aaaadb6ea9056c5d80c4144072cbc Mon Sep 17 00:00:00 2001 From: Kishore Sri venkata Ganesh Bolisetty Date: Tue, 10 Mar 2020 23:28:42 -0700 Subject: [PATCH] soc: qcom: msm_perf: add null policy checks for cpufreq policy null policy is expected especially when kernel is booted with maxcpus=1 argument. Change-Id: I30b17c224db340f74abcfcc27f2c2c91d74fd99e Signed-off-by: Kishore Sri venkata Ganesh Bolisetty --- drivers/soc/qcom/msm_performance.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soc/qcom/msm_performance.c b/drivers/soc/qcom/msm_performance.c index ac0d4e480b54..735a92a05737 100644 --- a/drivers/soc/qcom/msm_performance.c +++ b/drivers/soc/qcom/msm_performance.c @@ -482,6 +482,8 @@ static int __init msm_performance_init(void) per_cpu(msm_perf_cpu_stats, cpu).max = UINT_MAX; req = &per_cpu(qos_req_min, cpu); policy = cpufreq_cpu_get(cpu); + if (!policy) + continue; ret = freq_qos_add_request(&policy->constraints, req, FREQ_QOS_MIN, policy->min); if (ret < 0) {