drm/i915: Fix the static code analysis warning in debugfs
authorRadhakrishna Sripada <radhakrishna.sripada@intel.com>
Wed, 9 Jan 2019 21:14:14 +0000 (13:14 -0800)
committerJani Nikula <jani.nikula@intel.com>
Tue, 15 Jan 2019 10:48:30 +0000 (12:48 +0200)
intel_dp->dsc_dpcd is defined as an array making the if check redundant.

Fixes: e845f099f1c6 ("drm/i915/dsc: Add Per connector debugfs node for DSC support/enable")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190109211414.15622-1-radhakrishna.sripada@intel.com
drivers/gpu/drm/i915/i915_debugfs.c

index 37c9aff234e036dc955ffbb9227e6d817ecba36e..24e2d52efa8ee341e8d43f8a0088121d4d2737f9 100644 (file)
@@ -4973,9 +4973,8 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data)
                crtc_state = to_intel_crtc_state(crtc->state);
                seq_printf(m, "DSC_Enabled: %s\n",
                           yesno(crtc_state->dsc_params.compression_enable));
-               if (intel_dp->dsc_dpcd)
-                       seq_printf(m, "DSC_Sink_Support: %s\n",
-                                  yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd)));
+               seq_printf(m, "DSC_Sink_Support: %s\n",
+                          yesno(drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd)));
                if (!intel_dp_is_edp(intel_dp))
                        seq_printf(m, "FEC_Sink_Support: %s\n",
                                   yesno(drm_dp_sink_supports_fec(intel_dp->fec_capable)));