stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "PM / OPP: Error out on failing to add static OPPs for v1 bindings" has been added to the 4.9-stable tree
@ 2017-11-09  9:09 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-11-09  9:09 UTC (permalink / raw)
  To: viresh.kumar, alexander.levin, gregkh, rafael.j.wysocki, sboyd
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    PM / OPP: Error out on failing to add static OPPs for v1 bindings

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pm-opp-error-out-on-failing-to-add-static-opps-for-v1-bindings.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Thu Nov  9 09:48:01 CET 2017
From: Viresh Kumar <viresh.kumar@linaro.org>
Date: Mon, 2 Jan 2017 14:40:58 +0530
Subject: PM / OPP: Error out on failing to add static OPPs for v1 bindings

From: Viresh Kumar <viresh.kumar@linaro.org>


[ 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 <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 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;
 	}
 


Patches currently in stable-queue which might be from viresh.kumar@linaro.org are

queue-4.9/pm-opp-error-out-on-failing-to-add-static-opps-for-v1-bindings.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-09  9:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-09  9:09 Patch "PM / OPP: Error out on failing to add static OPPs for v1 bindings" has been added to the 4.9-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).