aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-10-03 11:56:47 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-29 20:21:22 -0400
commit9b29a86f04f87cdb9eaacadf2e2d33a55af1c7cc (patch)
treeda18087711176ce358b5d037b4ed9e4d113221f6
parent47182668ca140ae067d5961ec8c59edf646b36c7 (diff)
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>
-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)
119 struct cpuidle_driver *drv; 119 struct cpuidle_driver *drv;
120 int next_state, entered_state; 120 int next_state, entered_state;
121 121
122 if (off) 122 if (off || !initialized)
123 return -ENODEV;
124
125 if (!initialized)
126 return -ENODEV; 123 return -ENODEV;
127 124
128 /* check if the device is ready */ 125 /* check if the device is ready */