From patchwork Sun Sep 22 01:21:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20511 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6EF9D25E85 for ; Sun, 22 Sep 2013 01:22:22 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id x20sf1915215qcv.3 for ; Sat, 21 Sep 2013 18:22:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=xTzVVW9Y17vVOKYvCy5yzbzsJh+ZcnImyYjlblJR0Qg=; b=PWRHu2SUnzlLzKjDV7rS8u04E7laH/FT5Gv9s1hhAbPX5HEm1vHt++BapsCc2cSOrm T2N0edA7tVSGO6gEc+Pz3LYOtwAiHllpB+mxjvTrg4KN2XTSSR3Oe3UYl4xIUV8B2NKu SKJNPzT+B2p8nuV3m6lDrn1Fd+1RmdOsnYxCf1TLxz033dsCaWkLQ0El+1XIm1VF0jjL mo96puGb4Nf4JN9g29S9v8xeEi9TaHtTwDcgRm7p+r7fmUHWBCVGMv5TI08ZPd5PtReS toBjdSlO2LKUXNwHEa+PNLttIKwCA0zaLXhP9h8efzSm0Qgg9UdYKouaQD7Z5KSPCerx 9+Hw== X-Gm-Message-State: ALoCoQltti8NKCJ8Gj7cmWgtV3JVpHdj0+U3Yku74W5XsnwI5L7EnuPv0lO2JiFWHKaBOqoQlAab X-Received: by 10.224.96.136 with SMTP id h8mr15984qan.8.1379812942300; Sat, 21 Sep 2013 18:22:22 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.50.169 with SMTP id d9ls677346qeo.21.gmail; Sat, 21 Sep 2013 18:22:22 -0700 (PDT) X-Received: by 10.58.46.229 with SMTP id y5mr14071288vem.15.1379812942219; Sat, 21 Sep 2013 18:22:22 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id y4si4536773vcx.99.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 21 Sep 2013 18:22:22 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id kw10so1320642vcb.15 for ; Sat, 21 Sep 2013 18:22:22 -0700 (PDT) X-Received: by 10.221.44.136 with SMTP id ug8mr14092427vcb.13.1379812942126; Sat, 21 Sep 2013 18:22:22 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp91730vcz; Sat, 21 Sep 2013 18:22:21 -0700 (PDT) X-Received: by 10.68.101.225 with SMTP id fj1mr16170901pbb.8.1379812941306; Sat, 21 Sep 2013 18:22:21 -0700 (PDT) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by mx.google.com with ESMTPS id u5si15865383pbq.71.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 21 Sep 2013 18:22:21 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.47 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.47; Received: by mail-pa0-f47.google.com with SMTP id kp14so894428pab.34 for ; Sat, 21 Sep 2013 18:22:20 -0700 (PDT) X-Received: by 10.68.232.3 with SMTP id tk3mr343814pbc.121.1379812940912; Sat, 21 Sep 2013 18:22:20 -0700 (PDT) Received: from localhost ([122.167.152.64]) by mx.google.com with ESMTPSA id tz3sm24659700pbc.20.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 21 Sep 2013 18:22:20 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl, daniel.lezcano@linaro.org Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH 09/21] cpuidle: merge two if() statements for checking error cases Date: Sun, 22 Sep 2013 06:51:01 +0530 Message-Id: <63116bb9adaf7336a019ce087fbe17c4ace81cea.1379779777.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Both return same error message and so better write them in a single line. Signed-off-by: Viresh Kumar Acked-by: Daniel Lezcano --- drivers/cpuidle/cpuidle.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index aec9029..b8c63cb 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 (cpuidle_disabled()) - return -ENODEV; - - if (!initialized) + if (cpuidle_disabled() || !initialized) return -ENODEV; /* check if the device is ready */