diff options
author | Sri Krishna chowdary <schowdary@nvidia.com> | 2012-10-06 15:28:27 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-10-21 14:00:23 -0700 |
commit | 6e3ef0acd89ae5a6144e0625a8bb3752eec3957f (patch) | |
tree | 0188aa06076dd89d47a0910b143d6ff53cb29585 /arch/arm/mach-tegra/edp.c | |
parent | cde08d2ba6697f307e95493f24ba91d06242951c (diff) |
arm: tegra: power: fix coverity issue
Fix Unsigned can't be less than zero issue.
tegra_dvfs_predict_millivolts returns int, so
voltage_mV can't be unsigned int.
Bug 1046331
Change-Id: I7973c3a434beef1cc54c4d61024b0b381c4fc66f
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/142152
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/edp.c')
-rw-r--r-- | arch/arm/mach-tegra/edp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/edp.c b/arch/arm/mach-tegra/edp.c index 3e845076cf9c..b37c12fd7054 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 NVIDIA, Inc. + * Copyright (C) 2011-2012, NVIDIA CORPORATION. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -472,7 +472,8 @@ unsigned int edp_calculate_maxf(unsigned int a_temp, static int edp_relate_freq_voltage(struct clk *clk_cpu_g, unsigned int cpu_speedo_idx) { - unsigned int i, j, freq, voltage_mV, a_voltage_lut_size; + unsigned int i, j, freq, a_voltage_lut_size; + int voltage_mV; struct a_voltage_lut_t *a_voltage_lut; a_voltage_lut = edp_constants_lut[cpu_speedo_idx].a_voltage_lut; |