From: Lukasz Majewski Date: Fri, 21 Feb 2014 16:42:57 +0000 (+0100) Subject: cpufreq: conservative: Provide correct pointer for conservative governor X-Git-Tag: submit/tizen_common/20140630.083047~354 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ef96d27b01328853d0c7b4841b0a62d71d39bc4;p=platform%2Fkernel%2Flinux-3.10.git cpufreq: conservative: Provide correct pointer for conservative governor This patch restores correct value of cs_dbs_info pointer for conservative governor at CPUFREQ_GOV_STOP event. Without this patch the NULL pointer dereference error shows up and cpufreq subsystem hangs. To trigger the behavior one needs to compile ondemand as default one. Then enable conservative governor and afterwards enable ondemand again. Change-Id: Iefd933f5984abb1a46d15357b9ea5f8492deeb08 Signed-off-by: Lukasz Majewski --- diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 7eeb47f..5d7b8af 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -412,9 +412,10 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, break; case CPUFREQ_GOV_STOP: - if (governor == GOV_CONSERVATIVE) + if (governor == GOV_CONSERVATIVE) { + cs_dbs_info = dbs_data->cdata->get_cpu_dbs_info_s(cpu); cs_dbs_info->enable = 0; - + } gov_cancel_work(dbs_data, policy); mutex_lock(&dbs_data->mutex);