All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: bridge: thc63lvd1024: Print error message when DT parsing fails
@ 2024-03-18 16:06 Laurent Pinchart
  2024-03-18 16:42 ` Sui Jingfeng
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Laurent Pinchart @ 2024-03-18 16:06 UTC (permalink / raw)
  To: dri-devel
  Cc: Sui Jingfeng, Andrzej Hajda, Neil Armstrong, Robert Foss,
	Jonas Karlman, Jernej Skrabec

Commit 00084f0c01bf ("drm: bridge: thc63lvd1024: Switch to use
of_graph_get_remote_node()") simplified the thc63lvd1024 driver by
replacing hand-rolled code with a helper function. While doing so, it
created an error code path at probe time without any error message,
potentially causing probe issues that get annoying to debug. Fix it by
adding an error message.

Fixes: 00084f0c01bf ("drm: bridge: thc63lvd1024: Switch to use of_graph_get_remote_node()")
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/bridge/thc63lvd1024.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/thc63lvd1024.c b/drivers/gpu/drm/bridge/thc63lvd1024.c
index 5f99f9724081..674efc489e3a 100644
--- a/drivers/gpu/drm/bridge/thc63lvd1024.c
+++ b/drivers/gpu/drm/bridge/thc63lvd1024.c
@@ -125,8 +125,11 @@ static int thc63_parse_dt(struct thc63_dev *thc63)
 
 	remote = of_graph_get_remote_node(thc63->dev->of_node,
 					  THC63_RGB_OUT0, -1);
-	if (!remote)
+	if (!remote) {
+		dev_err(thc63->dev, "No remote endpoint for port@%u\n",
+			THC63_RGB_OUT0);
 		return -ENODEV;
+	}
 
 	thc63->next = of_drm_find_bridge(remote);
 	of_node_put(remote);

base-commit: 00084f0c01bf3a2591d007010b196e048281c455
-- 
Regards,

Laurent Pinchart


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-03-20 20:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18 16:06 [PATCH] drm: bridge: thc63lvd1024: Print error message when DT parsing fails Laurent Pinchart
2024-03-18 16:42 ` Sui Jingfeng
2024-03-18 18:04   ` Laurent Pinchart
2024-03-18 18:18     ` Sui Jingfeng
2024-03-18 19:23     ` Sui Jingfeng
2024-03-18 19:33       ` Sui Jingfeng
2024-03-19 15:49       ` Neil Armstrong
2024-03-20 20:04         ` Sui Jingfeng
2024-03-19 15:44 ` Neil Armstrong
2024-03-19 15:49 ` Neil Armstrong

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.