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 49 additions, 47 deletionsdrivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
- drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c 7 additions, 1 deletiondrivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
- drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c 4 additions, 1 deletion...ers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c
- drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.c 4 additions, 1 deletiondrivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.c
- drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c 4 additions, 1 deletion.../gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c
- drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c 3 additions, 0 deletions...rs/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
- drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource_helpers.c 5 additions, 5 deletions...rm/amd/display/dc/resource/dcn32/dcn32_resource_helpers.c