kernel-fxtec-pro1x/drivers/gpu
Dan Carpenter ae71f731f0 drm/vmwgfx: Fix two list_for_each loop exit tests
[ Upstream commit 4437c1152ce0e57ab8f401aa696ea6291cc07ab1 ]

These if statements are supposed to be true if we ended the
list_for_each_entry() loops without hitting a break statement but they
don't work.

In the first loop, we increment "i" after the "if (i == unit)" condition
so we don't necessarily know that "i" is not equal to unit at the end of
the loop.

In the second loop we exit when mode is not pointing to a valid
drm_display_mode struct so it doesn't make sense to check "mode->type".

Fixes: a278724aa2 ("drm/vmwgfx: Implement fbdev on kms v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-21 11:05:37 +02:00
..
drm drm/vmwgfx: Fix two list_for_each loop exit tests 2020-08-21 11:05:37 +02:00
host1x gpu: host1x: debug: Fix multiple channels emitting messages simultaneously 2020-08-19 08:14:52 +02:00
ipu-v3 gpu: ipu-v3: image-convert: Combine rotate/no-rotate irq handlers 2020-08-21 11:05:35 +02:00
vga vga_switcheroo: Fix missing gpu_bound call at audio client registration 2018-11-13 11:09:00 -08:00
Makefile