drm/amd/display: dereference variable before checking for zero
authorJosip Pavic <josip.pavic@amd.com>
Tue, 5 Dec 2023 21:57:27 +0000 (16:57 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Dec 2023 20:23:52 +0000 (15:23 -0500)
commit81b9aeb7b995f3870d691ec5ea95518d5b169203
tree559f997e347e8ed16e86a44cde98a993b3b2d7dc
parent51e7b64690776a9981355428b537af9048308a95
drm/amd/display: dereference variable before checking for zero

[Why]
Driver incorrectly checks if pointer variable OutBpp is null instead of
if the value being pointed to is zero.

[How]
Dereference OutBpp before checking for a value of zero.

Reviewed-by: Chaitanya Dhere <chaitanya.dhere@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Josip Pavic <josip.pavic@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/dml2/display_mode_core.c