drm/amd/display: Fix potential NULL pointer dereferences in 'dcn10_set_output_transfe...
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Thu, 25 Jan 2024 15:46:04 +0000 (21:16 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Jan 2024 20:34:41 +0000 (15:34 -0500)
commit9ccfe80d022df7c595f1925afb31de2232900656
treee097f435a70613d577f14ceee5964b61dd28f6b4
parentb8e9a995fbdab42b7f9ff54b19e87721382a76d5
drm/amd/display: Fix potential NULL pointer dereferences in 'dcn10_set_output_transfer_func()'

The 'stream' pointer is used in dcn10_set_output_transfer_func() before
the check if 'stream' is NULL.

Fixes the below:
drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn10/dcn10_hwseq.c:1892 dcn10_set_output_transfer_func() warn: variable dereferenced before check 'stream' (see line 1875)

Fixes: ddef02de0d71 ("drm/amd/display: add null checks before logging")
Cc: Wyatt Wood <wyatt.wood@amd.com>
Cc: Anthony Koo <Anthony.Koo@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c