diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-10-03 17:56:47 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-30 01:21:22 +0100 |
commit | 9b29a86f04f87cdb9eaacadf2e2d33a55af1c7cc (patch) | |
tree | da18087711176ce358b5d037b4ed9e4d113221f6 /drivers/cpuidle | |
parent | cpuidle: rearrange __cpuidle_register_device() to keep minimal exit points (diff) | |
download | linux-9b29a86f04f87cdb9eaacadf2e2d33a55af1c7cc.tar.xz 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.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 */ |