From patchwork Wed May 23 04:46:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 136613 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp423821lji; Tue, 22 May 2018 21:46:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqlaEtJxHTQCGXYogUOfEtz0r/LYGWFQZ/IAmgdEDM1ea2UOx5GuFlTEYfLqDbkzK2sAOV7 X-Received: by 2002:a63:2783:: with SMTP id n125-v6mr1027190pgn.377.1527050797132; Tue, 22 May 2018 21:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527050797; cv=none; d=google.com; s=arc-20160816; b=XVLwMT/MChgp8tWIrwm6jOuFeUUmb87LBo1pfIjMXUzV4GQ6T8A1cOogRYn7VeDbt+ FrnpuURRvHcwr3fjq7XUI8LJYkpvoy7199ZdJnCBMqnMCaBQuXi6nDMrwHU4/cbUy31c iALjgQUKviO3jBWrOhKKDT7H+zVMrVXA+vK98X+/PcZ9nmF0B6ak228OZ2V/3x/UWFAw 85C/H7YAjm07f7p7Mmmh086rnTx8OmcBepqceaUvf5kaNcRSD6pMI9KNwSQqqeruM3g2 X+VoR6+OjiIdF5l32d4g9VK+I3TLfWRIuQtRP9S0o0JmmoXjJEOpyz8VFm3MRMAucXLG dkeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=5G8hzqtN+w2pgc7N/wc3nQL9wYZhkNR0kKO3h+ur9QQ=; b=ohkDS+Qy5ciezRjUcHo9Wz8paKAJVD1UYSTziW5Rb4kay4n8/YE1rZptLbgi8491sp I1gLZ8gtzE2gKsHFEQt2m2HA2RPwP2KEPZFuxqvUHg4zO0wuCTnLArgPhd5Nc3whFOSQ 4dJS85ffD5HOOk+Y7aVEqCKNxJNLFYwjzU/0LCjIXwr8BS+yrqy3p0yXddVT88wRANPt trhbtNqQGeA93kGwVjTuG9fFyi98VlxktlwB9fmg6ZRu2LvhiHciAHV/6YDjSCa560BF WKYs48qLozXSRlyVIe/P8/ZYU2wCXSckB2ilnz/DaS86Qhv/OmtkKRCRr7jbo3pfae7z ogyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bjtokUtp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14-v6si17700128pfe.29.2018.05.22.21.46.36; Tue, 22 May 2018 21:46:37 -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=pass header.i=@linaro.org header.s=google header.b=bjtokUtp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753899AbeEWEqf (ORCPT + 10 others); Wed, 23 May 2018 00:46:35 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:43930 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753866AbeEWEqf (ORCPT ); Wed, 23 May 2018 00:46:35 -0400 Received: by mail-pf0-f196.google.com with SMTP id j20-v6so9843665pff.10 for ; Tue, 22 May 2018 21:46:35 -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=5G8hzqtN+w2pgc7N/wc3nQL9wYZhkNR0kKO3h+ur9QQ=; b=bjtokUtptfAeOBZo/FPRLKcv9pC99WYBsbqMCgE/kLYzUfkGjzKx23s/5quVUEamor Tb2Vsi97Qtwer6EUd93q71VobJbfhW0G2BHcH5OYFUqmYCYJG+lz3KxMGkAHim1nRuQn KGizi9IYK8SQbKkPQqxxUupwcGF8GMaQyy0Rs= 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=5G8hzqtN+w2pgc7N/wc3nQL9wYZhkNR0kKO3h+ur9QQ=; b=rZI9Z+mxIKiNcWSG3cpjyRxvPwo91kkmGlz0Mb2gMnKcBERN7V0lqfU2b6lJcU5V3L x+nXVCr7MYlzOWa/4z4SPY7rxy9jYkgHGXAkIjaCZrUAgaDJsCreftMNnapow3LHTNI0 NObBa4/VxZvL+gzI3jsJvuZP4b2Am6WRcqZ5RbrBdtjQ/ojU5KQsKjImzhp/tz6qbJ/O YzMtV31vZPt5kCyyhGojjzLt1NWfFd9qVx46WQfINvOZyIB+xBh6gD5E5WPjB0emlTXN EsnCtNz5sFljnB1c+4Vbt/gKJN/+zcsP+Q4DUZPHrDI7WLoczyDI5AaB8hoMKBOe333G dqhw== X-Gm-Message-State: ALKqPwcc7akrijFtV7+lhfzYYW7Wae6cvbhT2H7mMn0bby13KzCo4DCI vh9yI3NrYIkWCZsfbX5AgMgw+A== X-Received: by 2002:a62:3a1c:: with SMTP id h28-v6mr1301058pfa.209.1527050794652; Tue, 22 May 2018 21:46:34 -0700 (PDT) Received: from localhost ([122.167.163.112]) by smtp.gmail.com with ESMTPSA id s1-v6sm26665914pgr.66.2018.05.22.21.46.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 21:46:34 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Kevin Hilman , Ulf Hansson , Pavel Machek , Len Brown Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rajendra Nayak Subject: [PATCH] PM / Domain: Return 0 on error from of_genpd_opp_to_performance_state() Date: Wed, 23 May 2018 10:16:28 +0530 Message-Id: <70a36dba8745a6df3a79d00e995caab1e66c9eee.1527050748.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org of_genpd_opp_to_performance_state() should return 0 on errors, as its doc comment describes. While it follows that mostly, it returns a negative error number on one of the failures. Fix that. Fixes: 6e41766a6a50 ("PM / Domain: Implement of_genpd_opp_to_performance_state()") Reported-by: Rajendra Nayak Signed-off-by: Viresh Kumar --- drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.15.0.194.g9af6a3dea062 Acked-by: Ulf Hansson diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 29e25dc0584c..d668bb892d3f 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2446,7 +2446,7 @@ unsigned int of_genpd_opp_to_performance_state(struct device *dev, opp = of_dev_pm_opp_find_required_opp(&genpd->dev, opp_node); if (IS_ERR(opp)) { - state = PTR_ERR(opp); + dev_err(dev, "Failed to find required OPP: %d\n", PTR_ERR(opp)); goto unlock; }