[PATCH] drm/i915: uninitialized value on error path

Dan Carpenter dan.carpenter at oracle.com
Thu Apr 13 19:53:11 UTC 2017


"ret" isn't initialized on this error path.  It doesn't really cause
any problems unless it's randomly set to -EDEADLK which is not likely.

Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 48a546210d8b..d0e9578952d5 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9563,6 +9563,7 @@ int intel_get_load_detect_pipe(struct drm_connector *connector,
 	 */
 	if (!crtc) {
 		DRM_DEBUG_KMS("no pipe available for load-detect\n");
+		ret = -ENODEV;
 		goto fail;
 	}
 


More information about the dri-devel mailing list