From: Viresh Kumar Date: Thu, 3 Oct 2013 15:56:47 +0000 (+0530) Subject: cpuidle: merge two if() statements for checking error cases X-Git-Tag: upstream/snapshot3+hdmi~3917^2~5^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b29a86f04f87cdb9eaacadf2e2d33a55af1c7cc;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 8c91bad..518b542 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 */