All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "soc: qcom: smsm: fix child-node lookup" has been added to the 4.14-stable tree
@ 2018-03-22 13:31 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-03-22 13:31 UTC (permalink / raw)
  To: johan, alexander.levin, andy.gross, bjorn.andersson, gregkh,
	robdclark
  Cc: stable, stable-commits


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

    soc: qcom: smsm: fix child-node lookup

to the 4.14-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:
     soc-qcom-smsm-fix-child-node-lookup.patch
and it can be found in the queue-4.14 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 Mar 22 14:26:48 CET 2018
From: Johan Hovold <johan@kernel.org>
Date: Wed, 15 Nov 2017 12:07:24 +0100
Subject: soc: qcom: smsm: fix child-node lookup

From: Johan Hovold <johan@kernel.org>


[ Upstream commit 8804517e9fc16c10081ff5e42e7d80704973a8e2 ]

Fix child-node lookup during probe, which ended up searching the whole
device tree depth-first starting at the parent rather than just matching
on its children.

Note that the original premature free of the parent node has already
been fixed separately.

Also note that this pattern of looking up the first child node with a
given property is rare enough that a generic helper is probably not
warranted.

Fixes: c97c4090ff72 ("soc: qcom: smsm: Add driver for Qualcomm SMSM")
Fixes: 3e8b55411468 ("soc: qcom: smsm: fix of_node refcnting problem")
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/soc/qcom/smsm.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/soc/qcom/smsm.c
+++ b/drivers/soc/qcom/smsm.c
@@ -496,8 +496,10 @@ static int qcom_smsm_probe(struct platfo
 	if (!smsm->hosts)
 		return -ENOMEM;
 
-	local_node = of_find_node_with_property(of_node_get(pdev->dev.of_node),
-						"#qcom,smem-state-cells");
+	for_each_child_of_node(pdev->dev.of_node, local_node) {
+		if (of_find_property(local_node, "#qcom,smem-state-cells", NULL))
+			break;
+	}
 	if (!local_node) {
 		dev_err(&pdev->dev, "no state entry\n");
 		return -EINVAL;


Patches currently in stable-queue which might be from johan@kernel.org are

queue-4.14/soc-qcom-smsm-fix-child-node-lookup.patch

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

only message in thread, other threads:[~2018-03-22 13:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-22 13:31 Patch "soc: qcom: smsm: fix child-node lookup" has been added to the 4.14-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.