diff mbox series

drm/bridge: don't print EPROBE_DEFER as an error on bridge attach

Message ID 20211212191952.2148605-1-dev@lynxeye.de (mailing list archive)
State New, archived
Headers show
Series drm/bridge: don't print EPROBE_DEFER as an error on bridge attach | expand

Commit Message

Lucas Stach Dec. 12, 2021, 7:19 p.m. UTC
EPROBE_DEFER is a special error return code, that can happen during
normal system boot and should not be printed as an error.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 drivers/gpu/drm/drm_bridge.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index c96847fc0ebc..ee6a16b9046f 100644
--- a/drivers/gpu/drm/drm_bridge.c
+++ b/drivers/gpu/drm/drm_bridge.c
@@ -287,13 +287,15 @@  int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
 	bridge->encoder = NULL;
 	list_del(&bridge->chain_node);
 
+	if (ret != -EPROBE_DEFER) {
 #ifdef CONFIG_OF
-	DRM_ERROR("failed to attach bridge %pOF to encoder %s: %d\n",
-		  bridge->of_node, encoder->name, ret);
+		DRM_ERROR("failed to attach bridge %pOF to encoder %s: %d\n",
+			  bridge->of_node, encoder->name, ret);
 #else
-	DRM_ERROR("failed to attach bridge to encoder %s: %d\n",
-		  encoder->name, ret);
+		DRM_ERROR("failed to attach bridge to encoder %s: %d\n",
+			  encoder->name, ret);
 #endif
+	}
 
 	return ret;
 }