diff mbox series

[1/2] drm/bridge: ti-sn65dsi83: use dev_err_probe

Message ID 20220207075325.285179-1-alexander.stein@ew.tq-group.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/bridge: ti-sn65dsi83: use dev_err_probe | expand

Commit Message

Alexander Stein Feb. 7, 2022, 7:53 a.m. UTC
sn65dsi83_host_attach is called from probe, so silence message upon
deferred probe. This can happen, e.g. if the bridge driver is built-in, but
the host is built as module.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
This might look a bit weird in the first place, but the real benefit is
usage of device_set_deferred_probe_reason() inside dev_err_probe().
Having /sys/kernel/debug/devices_deferred providing more information
actually helped me tracking down an issue.

 drivers/gpu/drm/bridge/ti-sn65dsi83.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
index a88d90f928ce..1f02596d6db4 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
@@ -644,8 +644,7 @@  static int sn65dsi83_host_attach(struct sn65dsi83 *ctx)
 
 	host = of_find_mipi_dsi_host_by_node(ctx->host_node);
 	if (!host) {
-		dev_err(dev, "failed to find dsi host\n");
-		return -EPROBE_DEFER;
+		return dev_err_probe(dev, -EPROBE_DEFER, "failed to find dsi host\n");
 	}
 
 	dsi = devm_mipi_dsi_device_register_full(dev, host, &info);