From patchwork Fri Mar 17 05:49:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 9629837 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3949660132 for ; Fri, 17 Mar 2017 05:51:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29CD32865B for ; Fri, 17 Mar 2017 05:51:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C18D28697; Fri, 17 Mar 2017 05:51:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B84502865B for ; Fri, 17 Mar 2017 05:51:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750926AbdCQFvN (ORCPT ); Fri, 17 Mar 2017 01:51:13 -0400 Received: from mail-pg0-f42.google.com ([74.125.83.42]:35546 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750877AbdCQFvN (ORCPT ); Fri, 17 Mar 2017 01:51:13 -0400 Received: by mail-pg0-f42.google.com with SMTP id b129so35915233pgc.2 for ; Thu, 16 Mar 2017 22:49:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ckHyzM2EsO0ENb83v2YDCPNKItJGwYWWljcfOMknPrE=; b=WwRbRV34VeXuV/cnTUwRNObZBlxGLz9XoFYS67oFmDC35CEU2FfIx/JyW30pWjt9hf nMouPI1fbykZCdTsrU2OFIzkiSscIx8JmS6veW/J1JZz5axSKMX4XCTksza0nB8NQBCU 6P/CmlANznJ1AgxuX3ycuiLnJPFNP05pSS2yY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ckHyzM2EsO0ENb83v2YDCPNKItJGwYWWljcfOMknPrE=; b=dPdHZvA/DZGn8XlUl5XcFB0Qj5PtsFkr24nAPISQC0RbpvrUtSTPuKmo7ZIk0jXO59 taImJTr4FjZiepUn9wks6z7P08rqulOt+uhJ7x3nM7SpU4932kPs29WvKkvO/0h6UnhN JCcnXLhRPlcptGskrl6b5tqWis7HX7pemVXzM/13Z2HtlibLgcdQbGU1fxgOeEXyARet jkqCIyveJFiNM+Bqe+5V2PPsXaA7GcMlQ9DcSfY9zq8Ga8tnm//diYQup32wPnvNST9j q1AREQgwM6uQG/H354nee7gOztRVz1C0+aWEeh45cur1CrnIiCVSXMWVOfU/cQJ2k7Uh RSPw== X-Gm-Message-State: AFeK/H2rZ7iN7VTdi9a9FSoVPb4gB7wBR9DwEEH4DYF+ILpG/4HmlyOgdBY2yXBhr7KFOD66 X-Received: by 10.84.229.137 with SMTP id c9mr17585346plk.41.1489729771946; Thu, 16 Mar 2017 22:49:31 -0700 (PDT) Received: from localhost ([122.171.239.200]) by smtp.gmail.com with ESMTPSA id c64sm1649395pfc.83.2017.03.16.22.49.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Mar 2017 22:49:31 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Kevin Hilman , Ulf Hansson , Pavel Machek , Len Brown Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , Viresh Kumar Subject: [PATCH] PM / Domain: remove conditional from error case Date: Fri, 17 Mar 2017 11:19:21 +0530 Message-Id: <4e38240a7a65b5a7de90d4a0feb2dac277024aa6.1489729740.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.12.0.432.g71c3a4f4ba37 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no point running the conditional 'if' statement if the genpd isn't present. Signed-off-by: Viresh Kumar --- drivers/base/power/domain.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 202effbebfd1..03dd7a61f08a 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1789,12 +1789,12 @@ int of_genpd_add_provider_simple(struct device_node *np, mutex_lock(&gpd_list_lock); - if (pm_genpd_present(genpd)) + if (pm_genpd_present(genpd)) { ret = genpd_add_provider(np, genpd_xlate_simple, genpd); - - if (!ret) { - genpd->provider = &np->fwnode; - genpd->has_provider = true; + if (!ret) { + genpd->provider = &np->fwnode; + genpd->has_provider = true; + } } mutex_unlock(&gpd_list_lock);