]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/display: Return early after MISSING_CASE for write_dp_sdp
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 25 Mar 2020 14:07:54 +0000 (14:07 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 26 Mar 2020 13:21:03 +0000 (13:21 +0000)
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 <chris@chris-wilson.co.uk>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200325140754.12636-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/display/intel_dp.c

index 7f1a4e55cda11a4555b6240c428a7e66e5215198..c33a39065704f33bba6fe96735c546f8f222cb5e 100644 (file)
@@ -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))