From patchwork Thu Oct 4 04:16:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 148089 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp453598lji; Wed, 3 Oct 2018 21:16:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV62VaBYaFq0RxoPsqG1X63vXEMUozXiBvftuREpyN3i4a38SfOEjFXHPulzpO7+Gz5gs9HSF X-Received: by 2002:a17:902:694a:: with SMTP id k10-v6mr4613739plt.166.1538626619741; Wed, 03 Oct 2018 21:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538626619; cv=none; d=google.com; s=arc-20160816; b=U2/4KN/EsPvTJ8xttwgqCkClNJyr63c7XKv3Xas7hTK6y/nKVqDjaifi7rdUQH8CbX BLMec5gRFJuhar/8GmfB2aAZ6ZVqBTiQTsHQo674j6NX8I1Z9r6oe++dN4Zxr1i0U0Xn g6r9ivJEodHZbpv9BnxgJhk3AqrNSG9t0ZZztYUCD1D4Ufk+vhZ0MWLZOcELQLAhaFX3 lPootzc0Yarh/2tN3O+FCecRq2NaVGVIXzNMO1tuwzFJc+vX10cppUp/tmZH/MnMo6tL CS89oEeGgSG/b73zo7jjaoV7q2+jZzjIVfJh+npkl577r6/zVxw302bvleTzVimuQi4B u/JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=3QJUvhl8nGSVXoryOyi2C2kj4Aa4ByPO+MXzdk10tAg=; b=YaKXepNeWC+Om99GS9AOXrnhzKbsiMzuQOoq1krtBfYxgC5BogbKeu7Dn+r6FxmMem JZmodkzcbVKZdoxQkyePRUWAw1TkUDtJ+1pLaXCEgamyxqtpgYwbsZP7lLQUMnSlBuom 5LVvMEJBiDCAT46hEKSMQLkRXw1nkrqlx3+KipM1RQdOJmNesrJ+Zh+Za//i8Rucpr14 r3wBbjlqlZyaNAWTj9+kRMOy9SY2Yc5mlQ/5gwx21t3dyrBQFa/803ceQBoykg8Tx0Ae W8T1xZtp/8CTFHY6iLNW/H2YNDaDjbjYFHuB8PULeZSQ5mkGeakFFBwWDg40lh7aMmLL 3vWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aO9aKLH2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 j7-v6si3839822pfk.203.2018.10.03.21.16.59; Wed, 03 Oct 2018 21:16:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=aO9aKLH2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727273AbeJDLII (ORCPT + 32 others); Thu, 4 Oct 2018 07:08:08 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:46064 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726813AbeJDLIH (ORCPT ); Thu, 4 Oct 2018 07:08:07 -0400 Received: by mail-pf1-f194.google.com with SMTP id a23-v6so2689797pfi.12 for ; Wed, 03 Oct 2018 21:16:48 -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:in-reply-to:references; bh=3QJUvhl8nGSVXoryOyi2C2kj4Aa4ByPO+MXzdk10tAg=; b=aO9aKLH2SfmEOHKra6+bLGLaNm9o7XO34U2tZaF3phoKTqJa7DuOY5Cr0zV0Fsa+yx 2gkJL2LgOog5CJXmQ0TbbJDP6C2tQMsZajIPaR4O/53PKLArqSam6X4WTD715Ojs4zpT K2WV/NA3s2Xs+3h9OxbSbX6zWSlxczsMLd0+g= 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:in-reply-to :references; bh=3QJUvhl8nGSVXoryOyi2C2kj4Aa4ByPO+MXzdk10tAg=; b=GCM/Vi2bzgce8xO5+mCj4IFP5cVrAPSHyNCqUzk/vE1ThknZBiyXl5naIZu+iqPrsu z9vqpD2XA7YN3GA1EbX4M/k26ltCdpLfi/H3YdA1YTjHTPblojAjvxkcjXAOrikLi4qQ vJjIt6jNtywfTt0qL0gIMf3twQdLnO5Uev797FLfzwp5I5eGztpB4C/+TIKsugRFy7Hb uN57RblJFHfrXOb1CKYSyzas8MwEygeDwE7ouWFU4LahTXMZmueCmnugn5WK0BmirQZ1 RtuXERKSVXZOzJoe36uz4FCLnMwqZloiFKFDPiJPyYetVPZZnFWrQhe/PWzsdD+9QXeU c7Hg== X-Gm-Message-State: ABuFfognmaZEf3y/PNo4M+3dpqBe7J9znzxoNjuCBZ0iwa6MyG2/7CmZ m0uLl6P0DDUakrDjQ6PPCaDyPQ== X-Received: by 2002:a63:f80a:: with SMTP id n10-v6mr4069559pgh.57.1538626608560; Wed, 03 Oct 2018 21:16:48 -0700 (PDT) Received: from localhost ([122.172.76.11]) by smtp.gmail.com with ESMTPSA id k86-v6sm446236pfb.167.2018.10.03.21.16.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 21:16:48 -0700 (PDT) From: Viresh Kumar To: Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , niklas.cassel@linaro.org, d-gerlach@ti.com, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] OPP: Return error on error from dev_pm_opp_get_opp_count() Date: Thu, 4 Oct 2018 09:46:21 +0530 Message-Id: <09f662f95306f3e3d47ab6842bc4b0bb868a80ad.1538625101.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.18.0.rc1.242.g61856ae69a2c In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return error number instead of 0 on failures. Fixes: a1e8c13600bf ("PM / OPP: "opp-hz" is optional for power domains") Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.18.0.rc1.242.g61856ae69a2c diff --git a/drivers/opp/core.c b/drivers/opp/core.c index cdf918aaac34..2c2df4e4fc14 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -318,7 +318,7 @@ int dev_pm_opp_get_opp_count(struct device *dev) count = PTR_ERR(opp_table); dev_dbg(dev, "%s: OPP table not found (%d)\n", __func__, count); - return 0; + return count; } count = _get_opp_count(opp_table);