Skip to content

Commit 58ad4e6

Browse files
Anson-Huangrafaeljw
authored andcommitted
cpufreq: imx6q: remove unused code
In voltage scale down path, the return value is NOT used at all, remove them to simplify the code. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 0dc0eb7 commit 58ad4e6

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

drivers/cpufreq/imx6q-cpufreq.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,22 +177,16 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index)
177177
/* scaling down? scale voltage after frequency */
178178
if (new_freq < old_freq) {
179179
ret = regulator_set_voltage_tol(arm_reg, volt, 0);
180-
if (ret) {
180+
if (ret)
181181
dev_warn(cpu_dev,
182182
"failed to scale vddarm down: %d\n", ret);
183-
ret = 0;
184-
}
185183
ret = regulator_set_voltage_tol(soc_reg, imx6_soc_volt[index], 0);
186-
if (ret) {
184+
if (ret)
187185
dev_warn(cpu_dev, "failed to scale vddsoc down: %d\n", ret);
188-
ret = 0;
189-
}
190186
if (!IS_ERR(pu_reg)) {
191187
ret = regulator_set_voltage_tol(pu_reg, imx6_soc_volt[index], 0);
192-
if (ret) {
188+
if (ret)
193189
dev_warn(cpu_dev, "failed to scale vddpu down: %d\n", ret);
194-
ret = 0;
195-
}
196190
}
197191
}
198192

0 commit comments

Comments
 (0)