summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDavid Yu <davyu@nvidia.com>2014-02-17 11:01:55 +0900
committerHarry Hong <hhong@nvidia.com>2014-02-18 22:54:32 -0800
commit6695672df39a52c11b62664f5c9a303d2371ce27 (patch)
tree00366056307d0149fc5ec1a05f8109c0d1d33bc8 /arch
parent4cff6adb0e6b4b77a5eac4c2f80ba51c08560732 (diff)
ARM: tegra: edp: fix bug in tegra_edp_find_maxf()
Follwing log can be seen in the long running or sleeping device: cpu-tegra: Failed to set cpu frequency to 292 kHz Tegra cpufreq resume: restoring frequency to 292 kHz tegra_edp_find_maxf() was referencing freed memory address and returned its value. Bug 1453028 Change-Id: I9ab3d5f4104233cde0532eb96cc890fd2f3d68e0 Signed-off-by: David Yu <davyu@nvidia.com> Reviewed-on: http://git-master/r/368174 Reviewed-by: Harry Hong <hhong@nvidia.com> Tested-by: Harry Hong <hhong@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/edp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/edp.c b/arch/arm/mach-tegra/edp.c
index 3d1095adb800..9bef70c28e37 100644
--- a/arch/arm/mach-tegra/edp.c
+++ b/arch/arm/mach-tegra/edp.c
@@ -1,7 +1,7 @@
/*
* arch/arm/mach-tegra/edp.c
*
- * Copyright (c) 2011-2013, NVIDIA CORPORATION. All Rights Reserved.
+ * Copyright (c) 2011-2014, NVIDIA CORPORATION. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -536,7 +536,7 @@ unsigned int tegra_edp_find_maxf(int volt)
if (freq_voltage_lut_saved[i].voltage_mV > volt)
break;
}
- return freq_voltage_lut[i - 1].freq;
+ return freq_voltage_lut_saved[i - 1].freq;
}