[PATCH] drm/omap: dss: simplify omapdss_device_init_output
From: Andreas Kemnade
Date: Tue Nov 17 2026 - 13:40:55 EST
During reviewing of a regression fix is that function, questionable
possibly unbalanced drm_bridge_put/get came to light. Sashiko
review pointed out that of_drm_get_bridge_by_endpoint() does not return
NULL, so the questionable code is simply unreachable and therefore does
at least not harm. Remove the dead code.
Suggested-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>
Signed-off-by: Andreas Kemnade <andreas@xxxxxxxxxxxx>
---
drivers/gpu/drm/omapdrm/dss/output.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c
index b5cef5093a883..cbb9b2f1a2133 100644
--- a/drivers/gpu/drm/omapdrm/dss/output.c
+++ b/drivers/gpu/drm/omapdrm/dss/output.c
@@ -20,7 +20,6 @@ int omapdss_device_init_output(struct omap_dss_device *out,
struct drm_bridge *local_bridge)
{
struct drm_bridge *bridge;
- int ret;
bridge = of_drm_get_bridge_by_endpoint(out->dev->of_node, out->of_port, 0);
if (IS_ERR(bridge)) {
@@ -34,20 +33,11 @@ int omapdss_device_init_output(struct omap_dss_device *out,
out->bridge = bridge;
if (local_bridge) {
- if (!out->bridge) {
- ret = -EPROBE_DEFER;
- goto error;
- }
-
out->next_bridge = out->bridge;
out->bridge = drm_bridge_get(local_bridge);
}
return 0;
-
-error:
- omapdss_device_cleanup_output(out);
- return ret;
}
void omapdss_device_cleanup_output(struct omap_dss_device *out)
--
2.47.3