From patchwork Wed May 4 13:19:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 67132 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp177610qge; Wed, 4 May 2016 06:20:05 -0700 (PDT) X-Received: by 10.98.19.151 with SMTP id 23mr11964732pft.62.1462368005430; Wed, 04 May 2016 06:20:05 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uy8si4975066pab.145.2016.05.04.06.20.05; Wed, 04 May 2016 06:20:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751294AbcEDNUD (ORCPT + 13 others); Wed, 4 May 2016 09:20:03 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35633 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751272AbcEDNUB (ORCPT ); Wed, 4 May 2016 09:20:01 -0400 Received: by mail-pf0-f176.google.com with SMTP id 77so25240695pfv.2 for ; Wed, 04 May 2016 06:20:01 -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=JldXscFrLSmY74Mk2kd81z2j4NwRhAFHQcpyiqfNwS0=; b=f+nM92n1Zi/KL44qpjVfY3amnLD6zL9YjMmdwJ0sFLiOIIIgUBHXM/HXJg16dpMeuV QxWyDx9CdBL8wkETcJkPAHxJ+knekl5JScSg85dEg0Ia2MgobLm1tMldUIS0IBZnyeOk gw76rqKHP5xiLvagBSS5IOMxeCgG+3BSZMCGU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JldXscFrLSmY74Mk2kd81z2j4NwRhAFHQcpyiqfNwS0=; b=eY1A4Kh1G3ohjXVUTqARxu6sgG5DYoagRKhID1SND6MOXv6GZO0J7QFQvjspsRwOXH FJ3xx8+d3kAA/2lIgp/iAg8FtdD5vILn3arNKVm+8ShmY7V5YO0mBfzmgbPiwUuV2uS+ YYk6e0E+JZODfZei9h4shaiQyhM3aqS90VDxV9oB8y8UQ0IpYl2yS1qJaYcy6A5vHmLC OHk3ACBgWkWejVMXM/FCkeFNLFAUAyG774+d4J+0nDPIz1iaxAACYSzkIqG7Fbv////u gNIgLLJ2W17HnTFMfOxw102aeFjDFTSjsAXJbd4JhmDXSH1K6Rl41+SeAt/b3mDwjTct imVA== X-Gm-Message-State: AOPr4FWuHoInQetZmOPtO5MNR5z/aERz+AcMeDrNLDTVyIkbtgaJx0Fby4FE/rAbQG256pda X-Received: by 10.98.68.208 with SMTP id m77mr12010217pfi.25.1462368000786; Wed, 04 May 2016 06:20:00 -0700 (PDT) Received: from localhost ([122.172.166.220]) by smtp.gmail.com with ESMTPSA id e87sm6273490pfb.76.2016.05.04.06.19.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 May 2016 06:19:59 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , Marc Gonzalez , linux-kernel@vger.kernel.org Subject: [PATCH] PM / OPP: Remove useless check Date: Wed, 4 May 2016 18:49:55 +0530 Message-Id: <080908c24c189b44442b2fee7be83e760a6dac49.1462367990.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Regulators are optional for devices using OPPs and the OPP core shouldn't be printing any errors for such missing regulators. It was fine before the commit 0c717d0f9cb4, but that failed to update this part of the code to remove an 'always true' check and an extra unwanted print message. Fix that now. Fixes: 0c717d0f9cb4 ("PM / OPP: Initialize regulator pointer to an error value") Reported-by: Marc Gonzalez Signed-off-by: Viresh Kumar --- drivers/base/power/opp/core.c | 3 --- 1 file changed, 3 deletions(-) -- 2.7.1.410.g6faf27b -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c index 433b60092972..d8f4cc22856c 100644 --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c @@ -259,9 +259,6 @@ unsigned long dev_pm_opp_get_max_volt_latency(struct device *dev) reg = opp_table->regulator; if (IS_ERR(reg)) { /* Regulator may not be required for device */ - if (reg) - dev_err(dev, "%s: Invalid regulator (%ld)\n", __func__, - PTR_ERR(reg)); rcu_read_unlock(); return 0; }