提交 3fc74bd8 编写于 作者: G Gaurav Jindal 提交者: 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: NGaurav Jindal <gauravjindal1104@gmail.com>
[ rjw: Subject & changelog ]
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册