Re: [PATCH] drm/i915/display: Return early after MISSING_CSAE for write_dp_sdp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 25 Mar 2020, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:
> 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'.

Why am I not seeing this? GCC 8.3.0

Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>

Tpyo in the subject.

>
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> ---
>  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 7f1a4e55cda1..c33a39065704 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))

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux