Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5df60559 authored by jhbird.choi@samsung.com's avatar jhbird.choi@samsung.com Committed by Rafael J. Wysocki
Browse files

cpufreq: Fix unsigned variable being checked for negative value



clk_round_rate() returns singed value which was assigned to an unsigned
variable.
So it can't be checked for negative.

Signed-off-by: default avatarJonghwan Choi <jhbird.choi@samsung.com>
Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 27ed3cd2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -44,7 +44,8 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
{
	struct cpufreq_freqs freqs;
	struct opp *opp;
	unsigned long freq_Hz, volt = 0, volt_old = 0, tol = 0;
	unsigned long volt = 0, volt_old = 0, tol = 0;
	long freq_Hz;
	unsigned int index, cpu;
	int ret;