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/sti/sti_dvo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/gpu/drm/sti') diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c index ddb4184f0726..b6ee8a82e656 100644 --- a/drivers/gpu/drm/sti/sti_dvo.c +++ b/drivers/gpu/drm/sti/sti_dvo.c @@ -463,10 +463,8 @@ static int sti_dvo_bind(struct device *dev, struct device *master, void *data) drm_bridge_add(bridge); err = drm_bridge_attach(encoder, bridge, NULL, 0); - if (err) { - DRM_ERROR("Failed to attach bridge\n"); + if (err) return err; - } dvo->bridge = bridge; connector->encoder = encoder; -- cgit v1.2.3