aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
diff options
context:
space:
mode:
authorXiaomeng Tong <[email protected]>2022-03-27 05:53:55 +0000
committerPhilippe Cornu <[email protected]>2022-04-07 08:26:59 +0000
commit2e6c86be0e57079d1fb6c7c7e5423db096d0548a (patch)
tree2f1e33cc53b862be579e1952d918bdeebbc8be26 /drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
parentdma-buf/drivers: make reserving a shared slot mandatory v4 (diff)
downloadkernel-2e6c86be0e57079d1fb6c7c7e5423db096d0548a.tar.gz
kernel-2e6c86be0e57079d1fb6c7c7e5423db096d0548a.zip
stm: ltdc: fix two incorrect NULL checks on list iterator
The two bugs are here: if (encoder) { if (bridge && bridge->timings) The list iterator value 'encoder/bridge' will *always* be set and non-NULL by drm_for_each_encoder()/list_for_each_entry(), so it is incorrect to assume that the iterator value will be NULL if the list is empty or no element is found. To fix the bug, use a new variable '*_iter' as the list iterator, while use the old variable 'encoder/bridge' as a dedicated pointer to point to the found element. Cc: [email protected] Fixes: 99e360442f223 ("drm/stm: Fix bus_flags handling") Signed-off-by: Xiaomeng Tong <[email protected]> Acked-by: Raphael Gallais-Pou <[email protected]> Signed-off-by: Philippe Cornu <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c')
0 files changed, 0 insertions, 0 deletions