Files
linux/drivers/gpu/drm
Xiaomeng Tong 8b917cbe38 tilcdc: tilcdc_external: fix an incorrect NULL check on list iterator
The bug is here:
	if (!encoder) {

The list iterator value 'encoder' 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, use a new variable 'iter' as the list iterator,
while use the original variable 'encoder' as a dedicated pointer
to point to the found element.

Cc: stable@vger.kernel.org
Fixes: ec9eab097a ("drm/tilcdc: Add drm bridge support for attaching drm bridge drivers")
Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
Reviewed-by: Jyri Sarha <jyri.sarha@iki.fi>
Tested-by: Jyri Sarha <jyri.sarha@iki.fi>
Signed-off-by: Jyri Sarha <jyri.sarha@iki.fi>
Link: https://patchwork.freedesktop.org/patch/msgid/20220327061516.5076-1-xiam0nd.tong@gmail.com
2022-03-29 13:58:58 +03:00
..
2022-03-29 10:57:12 +02:00
2021-08-10 20:14:01 +02:00
2022-03-14 17:38:59 +02:00
2022-03-02 13:53:24 +00:00
2022-03-25 12:28:28 +01:00
2022-03-29 10:55:32 +02:00
2021-11-05 11:15:14 +01:00
2021-08-10 20:14:01 +02:00
2022-03-16 09:36:13 +01:00
2021-11-30 09:41:28 +01:00
2021-10-01 15:55:47 +02:00
2021-11-30 09:41:28 +01:00
2022-03-14 17:36:59 +02:00
2021-08-19 09:02:55 +09:00
2021-08-10 20:14:01 +02:00