]> www.infradead.org Git - nvme.git/commit
drm/amd/display: Check null pointers before multiple uses
authorAlex Hung <alex.hung@amd.com>
Tue, 25 Jun 2024 16:37:35 +0000 (10:37 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 23 Jul 2024 21:07:12 +0000 (17:07 -0400)
commitfdd5ecbbff751c3b9061d8ebb08e5c96119915b4
tree34be32742c9c22333cdfa5484ca8e6c31c4afce8
parentbe1fb44389ca3038ad2430dac4234669bc177ee3
drm/amd/display: Check null pointers before multiple uses

[WHAT & HOW]
Poniters, such as stream_enc and dc->bw_vbios, are null checked previously
in the same function, so Coverity warns "implies that stream_enc and
dc->bw_vbios might be null". They are used multiple times in the
subsequent code and need to be checked.

This fixes 10 FORWARD_NULL issues reported by Coverity.

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/core/dc_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c
drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.c
drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource_helpers.c