Patch "drm/bridge: tc358767: Add of_node_put() when breaking out of loop" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    drm/bridge: tc358767: Add of_node_put() when breaking out of loop

to the 6.0-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:
     drm-bridge-tc358767-add-of_node_put-when-breaking-ou.patch
and it can be found in the queue-6.0 subdirectory.

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



commit 4e8fd93fc8efb08de35e28a166ee0f032d5b5066
Author: Liang He <windhl@xxxxxxx>
Date:   Tue Jul 19 14:54:47 2022 +0800

    drm/bridge: tc358767: Add of_node_put() when breaking out of loop
    
    [ Upstream commit 14e7157afb055248ed34901fcd6fbf54201cfea1 ]
    
    In tc_probe_bridge_endpoint(), we should call of_node_put() when
    breaking out of the for_each_endpoint_of_node() which will automatically
    increase and decrease the refcount.
    
    Fixes: 71f7d9c03118 ("drm/bridge: tc358767: Detect bridge mode from connected endpoints in DT")
    Signed-off-by: Liang He <windhl@xxxxxxx>
    Reviewed-by: Robert Foss <robert.foss@xxxxxxxxxx>
    Signed-off-by: Robert Foss <robert.foss@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220719065447.1080817-2-windhl@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 02bd757a8987..1dc107f13645 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -2010,9 +2010,10 @@ static int tc_probe_bridge_endpoint(struct tc_data *tc)
 
 	for_each_endpoint_of_node(dev->of_node, node) {
 		of_graph_parse_endpoint(node, &endpoint);
-		if (endpoint.port > 2)
+		if (endpoint.port > 2) {
+			of_node_put(node);
 			return -EINVAL;
-
+		}
 		mode |= BIT(endpoint.port);
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux