Loading
drm/amd/display: Check null pointers before multiple uses
mainline inclusion from mainline-v6.12-rc1 commit fdd5ecbbff751c3b9061d8ebb08e5c96119915b4 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAYR8O CVE: CVE-2024-49920 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fdd5ecbbff751c3b9061d8ebb08e5c96119915b4 -------------------------------- [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> Conflicts: drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.c drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource_helpers.c drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c [Due to commit e53524cdcc02 (drm/amd/display: Refactor HWSS into component folder) rename related files, which not merge. And context conflicts in link_hwss_dio.c and dc_hw_sequencer.c.] Signed-off-by:
Gu Bowen <gubowen5@huawei.com>