drm/amd/display: Disable MALL SS and messages for PSR supported configs
Hello Dillon Varone,
This is a semi-automatic email about new static checker warnings.
The patch 0bed85e48af1: "drm/amd/display: Disable MALL SS and messages for PSR supported configs" from Jan 4, 2023, leads to the following Smatch complaint:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c:257 dcn32_apply_idle_power_optimizations()
warn: variable dereferenced before check 'dc->current_state' (see line 249)drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c
248
249 for (i = 0; i < dc->current_state->stream_count; i++) {
^^^^^^^^^^^^^^^^^^^Patch adds unchecked dereference
250 /* MALL SS messaging is not supported with PSR at this time */
251 if (dc->current_state->streams[i] != NULL &&
252 dc->current_state->streams[i]->link->psr_settings.psr_version != DC_PSR_VERSION_UNSUPPORTED)
253 return false;
254 }
255
256 if (enable) {
257 if (dc->current_state) {
^^^^^^^^^^^^^^^^^^^^^^^^Checked too late.
258
259 /* 1. Check no memory request case for CAB.
regards,
dan carpenter