drm/i915/lvds: Remove dead code from failing case
authorDamien Lespiau <damien.lespiau@intel.com>
Thu, 13 Feb 2014 18:56:15 +0000 (18:56 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 13 Feb 2014 20:11:15 +0000 (21:11 +0100)
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@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_lvds.c

index 6341a8873d284a312a02576843e961641f3cfcf4..398460862be6c8c938d94edb3ef13d6bfdf5f914 100644 (file)
@@ -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;