Received: by 10.223.164.202 with SMTP id h10csp191159wrb; Mon, 13 Nov 2017 05:02:48 -0800 (PST) X-Google-Smtp-Source: AGs4zMYRfh1uVqhNzsJ1oU2e+kMlXYO/PF3sVttHO2KsKyvJdpMc1KppSc6NINh5N4BWgeb7FF8A X-Received: by 10.99.39.198 with SMTP id n189mr8339131pgn.78.1510578168818; Mon, 13 Nov 2017 05:02:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510578168; cv=none; d=google.com; s=arc-20160816; b=Ueyr7KmqTO8h/gRgrapllqu7M80olrDm3fEKxNmZxPvb55z31HpDyrVFHg9wYYeEt8 LUctxSdrC4UBvGgcTxE0fYfdIpYD8SOMWpgJgVkLT539Cjau1iYGWstBt/4EaiTWELyw E3aXVMELTa27yIqG+gRkJInw9aWzruWgCXoad5rS8as5AocgpjzzP2E80yyzzqVWIJOy LSvS3CZy8gQR7/oJN5BNcUKLyIuIf1U9DrB7JiS2So3tZXf8wZ/uxjUMXfykcI63z4Qy UKwl4GhRn2XDrZMs3Yk0tXYetzeRd3q/FM5cTPSNMjOVjGetmFgdGPinPgd2NM2CYDB8 FkWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=omyMEWkTZEIxiM3feXRpjORN4j7PKUltg2T0NofXpp0=; b=Qe3YOAUzjVOyoxjkzK1hxtSVc/5czhujp6jJQw9aVFFrF6RjS4HGskXcKaZ0F39Q0N lkYE13YHc5SLlANQxeRj24Q0iufNNeVNg7iNXvX3XnVn0wSuAmUFPJS+ZKyTt8PjWnka XvXqpygm6lYdXKSj20OAjgjs7gK+oZRZfDUJmy44cMF3Q0qcvbjwTAhrDzP7Wg2OC+MY qnzoEoZuDFUuFVCJXpavydS1DUEJVn+gLfQHgIWMb6gxFiTk5WZu+81O3my1NgSsvpPy 6opWmLdLXHlOLHsJ4GeIKV9dkfgVH6Cvl7wKRgJ4Y6ZxLx0uzwwGHs/LqCE63c+u5qHB uPxQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si14137990plr.543.2017.11.13.05.02.35; Mon, 13 Nov 2017 05:02:48 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754385AbdKMNAe (ORCPT + 95 others); Mon, 13 Nov 2017 08:00:34 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:49990 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754358AbdKMNAb (ORCPT ); Mon, 13 Nov 2017 08:00:31 -0500 Received: from localhost (LFbn-1-12253-150.w90-92.abo.wanadoo.fr [90.92.67.150]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F2208AA5; Mon, 13 Nov 2017 13:00:30 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Viresh Kumar , Stephen Boyd , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.9 09/87] PM / OPP: Error out on failing to add static OPPs for v1 bindings Date: Mon, 13 Nov 2017 13:55:26 +0100 Message-Id: <20171113125616.114968586@linuxfoundation.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171113125615.304035578@linuxfoundation.org> References: <20171113125615.304035578@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Viresh Kumar [ Upstream commit 04a86a84c42ca18f37ab446127dc619b41dd3b23 ] The code adding static OPPs for V2 bindings already does so. Make the V1 bindings specific code behave the same. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/base/power/opp/of.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) --- a/drivers/base/power/opp/of.c +++ b/drivers/base/power/opp/of.c @@ -386,7 +386,7 @@ static int _of_add_opp_table_v1(struct d { const struct property *prop; const __be32 *val; - int nr; + int nr, ret; prop = of_find_property(dev->of_node, "operating-points", NULL); if (!prop) @@ -409,9 +409,13 @@ static int _of_add_opp_table_v1(struct d unsigned long freq = be32_to_cpup(val++) * 1000; unsigned long volt = be32_to_cpup(val++); - if (_opp_add_v1(dev, freq, volt, false)) - dev_warn(dev, "%s: Failed to add OPP %ld\n", - __func__, freq); + ret = _opp_add_v1(dev, freq, volt, false); + if (ret) { + dev_err(dev, "%s: Failed to add OPP %ld (%d)\n", + __func__, freq, ret); + dev_pm_opp_of_remove_table(dev); + return ret; + } nr -= 2; } From 1583890039498575341@xxx Sun Nov 12 19:34:10 +0000 2017 X-GM-THRID: 1583889364647193238 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread