linux-brain/drivers/gpu/drm/vmwgfx
Dan Carpenter 35b5e689ab 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 13:05:36 +02:00
..
device_include Revert "Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next" 2019-07-16 04:07:13 +10:00
Kconfig Revert "Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next" 2019-07-16 04:07:13 +10:00
Makefile Revert "Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next" 2019-07-16 04:07:13 +10:00
ttm_lock.c drm/vmwgfx: Kill unneeded legacy security features 2019-08-15 08:39:27 +02:00
ttm_lock.h drm/vmwgfx: drop use of drmP.h in header files 2019-08-15 08:40:04 +02:00
ttm_object.c drm/vmwgfx: Fix user space handle equal to zero 2019-05-21 10:23:09 +02:00
ttm_object.h drm/vmwgfx: drop use of drmP.h in header files 2019-08-15 08:40:04 +02:00
vmwgfx_binding.c drm/vmwgfx: Use preprocessor macro for FIFO allocation 2019-04-08 10:29:05 -07:00
vmwgfx_binding.h drm/vmwgfx: drop use of drmP.h in header files 2019-08-15 08:40:04 +02:00
vmwgfx_blit.c dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
vmwgfx_bo.c drm-misc-next for 5.4: 2019-08-21 16:44:41 +10:00
vmwgfx_cmdbuf.c drm/vmwgfx: drop use of drmP.h in header files 2019-08-15 08:40:04 +02:00
vmwgfx_cmdbuf_res.c drm/vmwgfx: prevent memory leak in vmw_cmdbuf_res_add 2020-02-24 08:36:49 +01:00
vmwgfx_context.c drm/vmwgfx: Assign eviction priorities to resources 2019-08-15 08:40:05 +02:00
vmwgfx_cotable.c drm-misc-next for 5.4: 2019-08-21 16:44:41 +10:00
vmwgfx_drv.c drm/vmwgfx: drop reminaing users of drmP.h 2019-08-15 08:40:04 +02:00
vmwgfx_drv.h drm/vmwgfx: Assign eviction priorities to resources 2019-08-15 08:40:05 +02:00
vmwgfx_execbuf.c Revert "Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next" 2019-07-16 04:07:13 +10:00
vmwgfx_fb.c drm/vmwgfx: drop reminaing users of drmP.h 2019-08-15 08:40:04 +02:00
vmwgfx_fence.c drm-misc-next for 5.4: 2019-08-21 16:44:41 +10:00
vmwgfx_fence.h drm/vmwgfx: drop use of drmP.h in header files 2019-08-15 08:40:04 +02:00
vmwgfx_fifo.c drm/vmwgfx: drop reminaing users of drmP.h 2019-08-15 08:40:04 +02:00
vmwgfx_gmr.c drm/vmwgfx: drop reminaing users of drmP.h 2019-08-15 08:40:04 +02:00
vmwgfx_gmrid_manager.c drm/vmwgfx: Return 0 when gmrid::get_node runs out of ID's 2019-03-20 07:53:29 +01:00
vmwgfx_ioctl.c drm/vmwgfx: Add a new define for vmwgfx user-space debugging 2019-04-08 10:29:04 -07:00
vmwgfx_irq.c drm/vmwgfx: drop reminaing users of drmP.h 2019-08-15 08:40:04 +02:00
vmwgfx_kms.c drm/vmwgfx: Fix two list_for_each loop exit tests 2020-08-21 13:05:36 +02:00
vmwgfx_kms.h drm/vmwgfx: drop use of drmP.h in header files 2019-08-15 08:40:04 +02:00
vmwgfx_ldu.c drm/vmwgfx: Use correct vmw_legacy_display_unit pointer 2020-08-21 13:05:36 +02:00
vmwgfx_marker.c
vmwgfx_mob.c drm/vmwgfx: drop reminaing users of drmP.h 2019-08-15 08:40:04 +02:00
vmwgfx_msg.c drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
vmwgfx_msg.h drm/vmwgfx: Update the backdoor call with support for new instructions 2019-08-28 13:36:46 +02:00
vmwgfx_overlay.c drm/vmwgfx: drop reminaing users of drmP.h 2019-08-15 08:40:04 +02:00
vmwgfx_prime.c
vmwgfx_reg.h
vmwgfx_resource.c drm-misc-next for 5.4: 2019-08-21 16:44:41 +10:00
vmwgfx_resource_priv.h drm/vmwgfx: Assign eviction priorities to resources 2019-08-15 08:40:05 +02:00
vmwgfx_scrn.c drm/vmwgfx: drop use of drmP.h in header files 2019-08-15 08:40:04 +02:00
vmwgfx_shader.c drm/vmwgfx: Assign eviction priorities to resources 2019-08-15 08:40:05 +02:00
vmwgfx_simple_resource.c drm/vmwgfx: Add a new define for vmwgfx user-space debugging 2019-04-08 10:29:04 -07:00
vmwgfx_so.c drm/vmwgfx: Use preprocessor macro for FIFO allocation 2019-04-08 10:29:05 -07:00
vmwgfx_so.h drm/vmwgfx: Be more restrictive when dirtying resources 2019-04-08 10:29:04 -07:00
vmwgfx_stdu.c drm/vmwgfx: drop use of drmP.h in header files 2019-08-15 08:40:04 +02:00
vmwgfx_surface.c drm/vmwgfx: Assign eviction priorities to resources 2019-08-15 08:40:05 +02:00
vmwgfx_ttm_buffer.c drm/vmwgfx: Honor the sg list segment size limitation 2019-06-11 17:00:23 +02:00
vmwgfx_ttm_glue.c drm/vmwgfx: drop reminaing users of drmP.h 2019-08-15 08:40:04 +02:00
vmwgfx_va.c
vmwgfx_validation.c Revert "Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next" 2019-07-16 04:07:13 +10:00
vmwgfx_validation.h drm/vmwgfx: drop use of drmP.h in header files 2019-08-15 08:40:04 +02:00