[Intel-gfx] [PATCH] drm/i915/lvds: Remove dead code from failing case

Paulo Zanoni przanoni at gmail.com
Thu Feb 13 20:04:48 CET 2014


2014-02-13 16:56 GMT-02:00 Damien Lespiau <damien.lespiau at intel.com>:
> Coverity points out that, if we end up in the 'failed' label, that's
> precisely because we couldn't retrieve a fixed mode (ie fixed_mode is
> NULL) and then "if (fixed_mode)" is always false.
>
> Remove that dead code.
>
> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>

Reviewed-by: Paulo Zanoni <paulo.r.zanoni at intel.com>

> ---
>  drivers/gpu/drm/i915/intel_lvds.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index 6341a88..3984608 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -1125,8 +1125,6 @@ failed:
>         DRM_DEBUG_KMS("No LVDS modes found, disabling.\n");
>         drm_connector_cleanup(connector);
>         drm_encoder_cleanup(encoder);
> -       if (fixed_mode)
> -               drm_mode_destroy(dev, fixed_mode);
>         kfree(lvds_encoder);
>         kfree(lvds_connector);
>         return;
> --
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Paulo Zanoni



More information about the Intel-gfx mailing list