From d121f63c00e3b82f2e72b1db0de3e233c2ba2126 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 25 Mar 2020 14:07:54 +0000 Subject: [PATCH] drm/i915/display: Return early after MISSING_CASE for write_dp_sdp Avoid using the uninitialised len along the impossible error path to shut the compiler up: drivers/gpu/drm/i915/display/intel_dp.c:4928 intel_write_dp_sdp() error: uninitialized symbol 'len'. Signed-off-by: Chris Wilson Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200325140754.12636-1-chris@chris-wilson.co.uk --- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 7f1a4e55cda11..c33a39065704f 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -4922,7 +4922,7 @@ static void intel_write_dp_sdp(struct intel_encoder *encoder, break; default: MISSING_CASE(type); - break; + return; } if (drm_WARN_ON(&dev_priv->drm, len < 0)) -- 2.39.5