summaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-10-03 21:26:47 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-30 01:21:22 +0100
commit9b29a86f04f87cdb9eaacadf2e2d33a55af1c7cc (patch)
treeda18087711176ce358b5d037b4ed9e4d113221f6 /drivers/cpuidle
parent47182668ca140ae067d5961ec8c59edf646b36c7 (diff)
downloadlinux-9b29a86f04f87cdb9eaacadf2e2d33a55af1c7cc.tar.gz
linux-9b29a86f04f87cdb9eaacadf2e2d33a55af1c7cc.tar.bz2
linux-9b29a86f04f87cdb9eaacadf2e2d33a55af1c7cc.zip
cpuidle: merge two if() statements for checking error cases
Two checks cpuidle_idle_call() cause the same error code to be returned if they fail, so merge them for clarity. [rjw: Changelog] Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/cpuidle.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 8c91badff00b..518b542cad54 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -119,10 +119,7 @@ int cpuidle_idle_call(void)
struct cpuidle_driver *drv;
int next_state, entered_state;
- if (off)
- return -ENODEV;
-
- if (!initialized)
+ if (off || !initialized)
return -ENODEV;
/* check if the device is ready */