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

Commit e5c87b76 authored by Stratos Karafotis's avatar Stratos Karafotis Committed by Rafael J. Wysocki
Browse files

cpufreq: Fix checkpatch errors and warnings



Fix 2 checkpatch errors about using assignment in if condition,
1 checkpatch error about a required space after comma
and 3 warnings about line over 80 characters.

Signed-off-by: default avatarStratos Karafotis <stratosk@semaphore.gr>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent bfa709bc
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
@@ -939,8 +939,11 @@ static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy,
	up_write(&policy->rwsem);

	if (has_target()) {
		if ((ret = __cpufreq_governor(policy, CPUFREQ_GOV_START)) ||
			(ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))) {
		ret = __cpufreq_governor(policy, CPUFREQ_GOV_START);
		if (!ret)
			ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS);

		if (ret) {
			pr_err("%s: Failed to start governor\n", __func__);
			return ret;
		}
@@ -1394,16 +1397,16 @@ static int __cpufreq_remove_dev_finish(struct device *dev,

		if (!cpufreq_suspended)
			cpufreq_policy_free(policy);
	} else {
		if (has_target()) {
			if ((ret = __cpufreq_governor(policy, CPUFREQ_GOV_START)) ||
					(ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))) {
				pr_err("%s: Failed to start governor\n",
				       __func__);
	} else if (has_target()) {
		ret = __cpufreq_governor(policy, CPUFREQ_GOV_START);
		if (!ret)
			ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS);

		if (ret) {
			pr_err("%s: Failed to start governor\n", __func__);
			return ret;
		}
	}
	}

	per_cpu(cpufreq_cpu_data, cpu) = NULL;
	return 0;