From fb8d617f8fd64f52f62e4f782aed64d1754ed33b Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 23 Mar 2021 23:50:08 +0200 Subject: drm/bridge: Centralize error message when bridge attach fails Being informed of a failure to attach a bridge is useful, and many drivers prints an error message in that case. Move the message to drm_bridge_attach() to avoid code duplication. Suggested-by: Stephen Boyd Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_external.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/gpu/drm/tilcdc') diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm/tilcdc/tilcdc_external.c index b177525588c1..7594cf6e186e 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_external.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_external.c @@ -93,10 +93,8 @@ int tilcdc_attach_bridge(struct drm_device *ddev, struct drm_bridge *bridge) priv->external_encoder->possible_crtcs = BIT(0); ret = drm_bridge_attach(priv->external_encoder, bridge, NULL, 0); - if (ret) { - dev_err(ddev->dev, "drm_bridge_attach() failed %d\n", ret); + if (ret) return ret; - } tilcdc_crtc_set_panel_info(priv->crtc, &panel_info_default); -- cgit v1.2.3-70-g09d2