drm/amd/display: Check null-initialized variables
authorAlex Hung <alex.hung@amd.com>
Thu, 27 Jun 2024 23:34:18 +0000 (17:34 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 23 Jul 2024 21:07:11 +0000 (17:07 -0400)
commit367cd9ceba1933b63bc1d87d967baf6d9fd241d2
tree7c5d2d83a23e660d72ad70b8c596771dc0f6a428
parentb995c0a6de6c74656a0c39cd57a0626351b13e3c
drm/amd/display: Check null-initialized variables

[WHAT & HOW]
drr_timing and subvp_pipe are initialized to null and they are not
always assigned new values. It is necessary to check for null before
dereferencing.

This fixes 2 FORWARD_NULL issues reported by Coverity.

Reviewed-by: Nevenko Stupar <nevenko.stupar@amd.com>
Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Jerry Zuo <jerry.zuo@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c