Commit 391c6fb4 authored by Alex Hung's avatar Alex Hung Committed by Alex Deucher

drm/amd/display: Remove redundant checks for context

The null checks for context are redundant as it was already
dereferenced previously, as reported by Coverity; therefore
the null checks are removed.

This fixes 2 REVERSE_INULL issues reported by Coverity.
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Acked-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8a170832
...@@ -505,7 +505,7 @@ void set_p_state_switch_method( ...@@ -505,7 +505,7 @@ void set_p_state_switch_method(
struct vba_vars_st *vba = &context->bw_ctx.dml.vba; struct vba_vars_st *vba = &context->bw_ctx.dml.vba;
bool enable_subvp; bool enable_subvp;
if (!dc->ctx || !dc->ctx->dmub_srv || !pipe_ctx || !vba || !context) if (!dc->ctx || !dc->ctx->dmub_srv || !pipe_ctx || !vba)
return; return;
if (vba->DRAMClockChangeSupport[vba->VoltageLevel][vba->maxMpcComb] != if (vba->DRAMClockChangeSupport[vba->VoltageLevel][vba->maxMpcComb] !=
......
...@@ -573,10 +573,7 @@ static bool dml2_validate_and_build_resource(const struct dc *in_dc, struct dc_s ...@@ -573,10 +573,7 @@ static bool dml2_validate_and_build_resource(const struct dc *in_dc, struct dc_s
bool need_recalculation = false; bool need_recalculation = false;
uint32_t cstate_enter_plus_exit_z8_ns; uint32_t cstate_enter_plus_exit_z8_ns;
if (!context) if (context->stream_count == 0) {
return true;
else if (context->stream_count == 0) {
unsigned int lowest_state_idx = 0; unsigned int lowest_state_idx = 0;
out_clks.p_state_supported = true; out_clks.p_state_supported = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment