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 19:59:02 +0000 (14:59 -0500)
commit3582e0ba8a675d72c3cc6dd1b847e6aa757845da
tree99572c3e759889a3a2cb57f59e326ffdf7c96bc3
parent72eaa723187b87f1793529eaadbcfaa836c17812
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