[Intel-gfx] [PATCH 2/9] drm/i915/dvo: Don't leak connector state on DVO init failure

Ville Syrjala ville.syrjala at linux.intel.com
Fri Nov 18 10:55:18 UTC 2022


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

If we can't initialize the DVO encoder also free the connector
state allocated by intel_connector_alloc().

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dvo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dvo.c b/drivers/gpu/drm/i915/display/intel_dvo.c
index 94dcc43876c9..8859e400b860 100644
--- a/drivers/gpu/drm/i915/display/intel_dvo.c
+++ b/drivers/gpu/drm/i915/display/intel_dvo.c
@@ -535,5 +535,5 @@ void intel_dvo_init(struct drm_i915_private *dev_priv)
 	}
 
 	kfree(intel_dvo);
-	kfree(intel_connector);
+	intel_connector_free(intel_connector);
 }
-- 
2.37.4



More information about the Intel-gfx mailing list