drm/vmwgfx: Use correct vmw_legacy_display_unit pointer
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 26 Jun 2020 10:34:37 +0000 (13:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:05:36 +0000 (13:05 +0200)
commit95922cdab4ad7cbd0c1a50a165fa01ffd899fac4
tree70e72fc05c6121f68b5cf9da94534b2b26dd0b8f
parent1d8dce52a0085cd9fc7db85f42dea5c4fd66e971
drm/vmwgfx: Use correct vmw_legacy_display_unit pointer

[ Upstream commit 1d2c0c565bc0da25f5e899a862fb58e612b222df ]

The "entry" pointer is an offset from the list head and it doesn't
point to a valid vmw_legacy_display_unit struct.  Presumably the
intent was to point to the last entry.

Also the "i++" wasn't used so I have removed that as well.

Fixes: d7e1958dbe4a ("drm/vmwgfx: Support older hardware.")
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>
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c