mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: ti-sn65dsi86: Use dev_err_probe() to avoid polluting the log
@ 2022-07-22  7:47 Javier Martinez Canillas
  2022-07-22  8:52 ` Neil Armstrong
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2022-07-22  7:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: Erico Nunes, Enric Balletbo i Serra, Javier Martinez Canillas,
	Andrzej Hajda, Daniel Vetter, David Airlie, Douglas Anderson,
	Jernej Skrabec, Jonas Karlman, Laurent Pinchart, Neil Armstrong,
	Robert Foss, dri-devel

If devm_drm_of_get_bridge() can't find the connected bridge, it returns an
ERR_PTR(-EPROBE_DEFER) to indicate that the probe should be deferred.

But this path also prints an error message, which pollutes the kernel log
since is printed on every probe deferral, i.e:

  $ dmesg | grep "failed to create panel bridge" | wc -l
  38

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 369bf72717f6..90bbabde1595 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -1206,10 +1206,9 @@ static int ti_sn_bridge_probe(struct auxiliary_device *adev,
 	int ret;
 
 	pdata->next_bridge = devm_drm_of_get_bridge(pdata->dev, np, 1, 0);
-	if (IS_ERR(pdata->next_bridge)) {
-		DRM_ERROR("failed to create panel bridge\n");
-		return PTR_ERR(pdata->next_bridge);
-	}
+	if (IS_ERR(pdata->next_bridge))
+		return dev_err_probe(pdata->dev, PTR_ERR(pdata->next_bridge),
+				     "failed to create panel bridge\n");
 
 	ti_sn_bridge_parse_lanes(pdata, np);
 
-- 
2.36.1


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

end of thread, other threads:[~2022-07-22 23:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22  7:47 [PATCH] drm/bridge: ti-sn65dsi86: Use dev_err_probe() to avoid polluting the log Javier Martinez Canillas
2022-07-22  8:52 ` Neil Armstrong
2022-07-22 12:56 ` Andrzej Hajda
2022-07-22 13:35 ` Doug Anderson
2022-07-22 23:41   ` Javier Martinez Canillas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®