diff mbox series

[3/3] drm/i915/ddi: propagate errors from intel_ddi_init_hdmi_connector()

Message ID 9e8840b3815919370a1f15c515772e151a32cc06.1731599468.git.jani.nikula@intel.com (mailing list archive)
State New
Headers show
Series drm/i915/display: handle hdmi connector init failures | expand

Commit Message

Jani Nikula Nov. 14, 2024, 3:52 p.m. UTC
Propagate connector init errors from
intel_ddi_init_hdmi_connector(). The caller already handles the
allocation failures, and this is all similar to
intel_ddi_init_dp_connector().

Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index f3368cf52641..276b73bed07f 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -4705,7 +4705,11 @@  intel_ddi_init_hdmi_connector(struct intel_digital_port *dig_port)
 		return NULL;
 
 	dig_port->hdmi.hdmi_reg = DDI_BUF_CTL(port);
-	intel_hdmi_init_connector(dig_port, connector);
+
+	if (!intel_hdmi_init_connector(dig_port, connector)) {
+		kfree(connector);
+		return NULL;
+	}
 
 	return connector;
 }