From patchwork Thu Oct 3 15:56:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20797 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EB05D25CAB for ; Thu, 3 Oct 2013 15:57:56 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id cm18sf295678qab.0 for ; Thu, 03 Oct 2013 08:57:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state: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=hpZhsIzhlmS/cFOiSIDYvubnYbd4z3HfCx3+6FWaCdk=; b=SGjJBUh6j0PP9xSsaK9sZ64OhjFm1ddKCJucT0G9QG1wqjGG9t0WtpD6GR1IFOyzYL ItBoIA8qtvZM18pUqAgKZEqU+vyJMuVB1WNRcsodDI+pwMPStsjCWGd7Cmj85TZL0vgB IERyhO3X8yOn0b+TqPv4tCVsdMo5Pa1olY8HJFYurGzRSZtIqYyI+zHLpDhX0BoDcd1K VB0ocwwzlUxZHRBouzHW3MdBBw+YYyVYWoJ8mBlHP/JBZQlh7mtMWhlCSqDNZwY7MBEn 3SIrSfj3BVeJkjXovAmsBvMU2SdRTtEqIt0n4vwSBjs8S2G2/Flxy3/DwXQn3Ht7Mewd wfTg== X-Received: by 10.236.52.7 with SMTP id d7mr7633419yhc.32.1380815876776; Thu, 03 Oct 2013 08:57:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.168 with SMTP id w8ls982470qeu.64.gmail; Thu, 03 Oct 2013 08:57:56 -0700 (PDT) X-Received: by 10.58.229.41 with SMTP id sn9mr8049371vec.11.1380815876644; Thu, 03 Oct 2013 08:57:56 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id rx3si1883805vcb.80.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Oct 2013 08:57:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id jy13so1805757veb.5 for ; Thu, 03 Oct 2013 08:57:56 -0700 (PDT) X-Gm-Message-State: ALoCoQl4hMoOFParZYMsYLOIxxW4bdVal0v1InVJfmaivBg+vooGj67o4DLGnUZlDOYiTq2gN5+h X-Received: by 10.52.24.4 with SMTP id q4mr649404vdf.34.1380815876539; Thu, 03 Oct 2013 08:57:56 -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 u4csp189203vcz; Thu, 3 Oct 2013 08:57:56 -0700 (PDT) X-Received: by 10.66.233.37 with SMTP id tt5mr10145023pac.95.1380815875645; Thu, 03 Oct 2013 08:57:55 -0700 (PDT) Received: from mail-pb0-f48.google.com (mail-pb0-f48.google.com [209.85.160.48]) by mx.google.com with ESMTPS id mo9si6025037pbc.276.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Oct 2013 08:57:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.48 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.48; Received: by mail-pb0-f48.google.com with SMTP id ma3so2651849pbc.21 for ; Thu, 03 Oct 2013 08:57:55 -0700 (PDT) X-Received: by 10.67.14.231 with SMTP id fj7mr10329322pad.115.1380815875214; Thu, 03 Oct 2013 08:57:55 -0700 (PDT) Received: from localhost ([122.167.152.64]) by mx.google.com with ESMTPSA id ta10sm11587878pab.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 03 Oct 2013 08:57:54 -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 V2 08/16] cpuidle: merge two if() statements for checking error cases Date: Thu, 3 Oct 2013 21:26:47 +0530 Message-Id: <2e680462629529a569ab67dbd9ea4071f01f115c.1380815504.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.128.174 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. Acked-by: Daniel Lezcano Signed-off-by: Viresh Kumar --- 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 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 */