aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/imx/imx-ldb.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2021-03-23 23:50:08 +0200
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2021-07-28 16:33:12 +0300
commitfb8d617f8fd64f52f62e4f782aed64d1754ed33b (patch)
tree7e3cd439909f419bc2e898b99eb3fd577f6dfd53 /drivers/gpu/drm/imx/imx-ldb.c
parentdrm: rcar-du: Shutdown the display on remove (diff)
downloadlinux-dev-fb8d617f8fd64f52f62e4f782aed64d1754ed33b.tar.xz
linux-dev-fb8d617f8fd64f52f62e4f782aed64d1754ed33b.zip
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 <swboyd@chromium.org> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Jyri Sarha <jyri.sarha@iki.fi>
Diffstat (limited to 'drivers/gpu/drm/imx/imx-ldb.c')
-rw-r--r--drivers/gpu/drm/imx/imx-ldb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
index 53132ddf9587..e5078d03020d 100644
--- a/drivers/gpu/drm/imx/imx-ldb.c
+++ b/drivers/gpu/drm/imx/imx-ldb.c
@@ -465,10 +465,8 @@ static int imx_ldb_register(struct drm_device *drm,
if (imx_ldb_ch->bridge) {
ret = drm_bridge_attach(encoder, imx_ldb_ch->bridge, NULL, 0);
- if (ret) {
- DRM_ERROR("Failed to initialize bridge with drm\n");
+ if (ret)
return ret;
- }
} else {
/*
* We want to add the connector whenever there is no bridge