diff options
author | Lukasz Majewski <l.majewski@samsung.com> | 2014-02-21 17:42:57 +0100 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:47:02 +0900 |
commit | b5e9e3fca6f9a945bc3a10c367f3ee4f71f7a59f (patch) | |
tree | da71b25f8e5e454392b61a2e7057351d686b698d | |
parent | 1b52b6764109940190de639c57bb7d52b0e4e863 (diff) | |
download | linux-3.10-b5e9e3fca6f9a945bc3a10c367f3ee4f71f7a59f.tar.gz linux-3.10-b5e9e3fca6f9a945bc3a10c367f3ee4f71f7a59f.tar.bz2 linux-3.10-b5e9e3fca6f9a945bc3a10c367f3ee4f71f7a59f.zip |
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 <l.majewski@samsung.com>
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 7eeb47fa187..5d7b8affa6b 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); |