Commit 3fc74bd8 authored by Gaurav Jindal's avatar Gaurav Jindal Committed by Rafael J. Wysocki

cpuidle: Avoid assignment in if () argument

Clean up cpuidle_enable_device() to avoid doing an assignment
in an expression evaluated as an argument of if (), which also
makes the code in question more readable.
Signed-off-by: default avatarGaurav Jindal <gauravjindal1104@gmail.com>
[ rjw: Subject & changelog ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent e7b06a09
...@@ -403,9 +403,11 @@ int cpuidle_enable_device(struct cpuidle_device *dev) ...@@ -403,9 +403,11 @@ int cpuidle_enable_device(struct cpuidle_device *dev)
if (ret) if (ret)
return ret; return ret;
if (cpuidle_curr_governor->enable && if (cpuidle_curr_governor->enable) {
(ret = cpuidle_curr_governor->enable(drv, dev))) ret = cpuidle_curr_governor->enable(drv, dev);
goto fail_sysfs; if (ret)
goto fail_sysfs;
}
smp_wmb(); smp_wmb();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment