diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-10-03 21:26:47 +0530 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-30 01:21:22 +0100 |
commit | 9b29a86f04f87cdb9eaacadf2e2d33a55af1c7cc (patch) | |
tree | da18087711176ce358b5d037b4ed9e4d113221f6 /drivers/cpuidle/cpuidle.c | |
parent | 47182668ca140ae067d5961ec8c59edf646b36c7 (diff) | |
download | linux-next-9b29a86f04f87cdb9eaacadf2e2d33a55af1c7cc.tar.gz |
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/cpuidle.c')
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 5 |
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 */ |