drm/i915/lvds: Remove dead code from failing case
Subsystems (2)
PATCH 1/1 drm/i915/lvds: Remove dead code from failing case
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.
--- drivers/gpu/drm/i915/intel_lvds.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/i915/intel_lvds.c +0 -2
@@ -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 ;
Signature · 1 line
1.8.3.1
2014-02-13 16:56 GMT-02:00 Damien Lespiau <[email protected]>:
Quoted 7 lines
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_modeis NULL) and then "if (fixed_mode)" is always false.Remove that dead code.
Signed-off-by Damien Lespiau <[email protected]>
Quoted 24 lines
--- drivers/gpu/drm/i915/intel_lvds.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/i915/intel_lvds.c +0
-3@@ -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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Paulo Zanoni
Daniel Vetter
AppliedQuoted 10 lines · Paulo Zanoni
2014-02-13 16:56 GMT-02:00 Damien Lespiau <[email protected]>:
Quoted 7 lines
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_modeis NULL) and then "if (fixed_mode)" is always false.Remove that dead code.
Signed-off-by Damien Lespiau <[email protected]>Reviewed-by Paulo Zanoni <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch