linux-stable/drivers/gpu
Xiaomeng Tong 7ef2fb384f gma500: fix an incorrect NULL check on list iterator
commit bdef417d84 upstream.

The bug is here:
	return crtc;

The list iterator value 'crtc' will *always* be set and non-NULL by
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, return 'crtc' when found, otherwise return NULL.

Cc: stable@vger.kernel.org
fixes: 89c78134cc ("gma500: Add Poulsbo support")
Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220327052028.2013-1-xiam0nd.tong@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-14 16:53:54 +02:00
..
drm gma500: fix an incorrect NULL check on list iterator 2022-06-14 16:53:54 +02:00
host1x gpu: host1x: debug: Fix multiple channels emitting messages simultaneously 2020-08-21 09:48:06 +02:00
ipu-v3 gpu: ipu-v3: Fix dev_dbg frequency output 2022-04-20 09:08:32 +02:00
vga vga_switcheroo: Use device link for HDA controller 2020-06-20 10:25:16 +02:00
Makefile