drm/amd/display: Fix variable deferencing before NULL check in edp_setup_replay()
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Mon, 8 Jan 2024 15:50:28 +0000 (21:20 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Jan 2024 23:32:19 +0000 (18:32 -0500)
commit7073934f5d73f8b53308963cee36f0d389ea857c
tree2d2baa33ea479fbdcc3419a6a7598488ca62e7f2
parent2b9a073b7304f4a9e130d04794c91a0c4f9a5c12
drm/amd/display: Fix variable deferencing before NULL check in edp_setup_replay()

In edp_setup_replay(), 'struct dc *dc' & 'struct dmub_replay *replay'
was dereferenced before the pointer 'link' & 'replay' NULL check.

Fixes the below:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_edp_panel_control.c:947 edp_setup_replay() warn: variable dereferenced before check 'link' (see line 933)

Cc: stable@vger.kernel.org
Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c