Skip to content

Commit ff599ef

Browse files
Alex Hungalexdeucher
authored andcommitted
drm/amd/display: Check null pointer before dereferencing se
[WHAT & HOW] se is null checked previously in the same function, indicating it might be null; therefore, it must be checked when used again. This fixes 1 FORWARD_NULL issue reported by Coverity. Acked-by: Alex Hung <alex.hung@amd.com> Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@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>
1 parent ce83ae2 commit ff599ef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/gpu/drm/amd/display/dc/core

drivers/gpu/drm/amd/display/dc/core/dc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1767,7 +1767,7 @@ bool dc_validate_boot_timing(const struct dc *dc,
17671767
if (crtc_timing->pix_clk_100hz != pix_clk_100hz)
17681768
return false;
17691769

1770-
if (!se->funcs->dp_get_pixel_format)
1770+
if (!se || !se->funcs->dp_get_pixel_format)
17711771
return false;
17721772

17731773
if (!se->funcs->dp_get_pixel_format(

0 commit comments

Comments
 (0)