linux-stable/drivers/gpu/drm/tiny
Dan Carpenter 9c6f19421c drm: simpledrm: fix a potential NULL dereference
The drm_format_info() function returns NULL if the format is
unsupported, but the simplefb_get_validated_format() is expected to
return error pointers.  If we propagate the NULL return then it will
lead to a NULL dereference in the callers.  Swap the NULL and trade it
in for an ERR_PTR(-EINVAL).

Fixes: 11e8f5fd22 ("drm: Add simpledrm driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/YJ+aC47XX58ICXax@mwanda
2021-05-15 14:04:42 +02:00
..
arcpgu.c
cirrus.c drm/format-helper: Pass destination pitch to drm_fb_memcpy_dstclip() 2021-05-01 12:45:03 +02:00
gm12u320.c drm-misc-next for 5.13: 2021-03-16 17:08:46 +10:00
hx8357d.c drm/hx8357d: Avoid spamming logs if probe is deferred 2021-04-27 13:15:12 +02:00
ili9225.c drm/ili9225: Avoid spamming logs if probe is deferred 2021-04-27 13:14:58 +02:00
ili9341.c drm/ili9341: Avoid spamming logs if probe is deferred 2021-04-27 13:14:42 +02:00
ili9486.c drm/ili9486: Avoid spamming logs if probe is deferred 2021-04-27 13:14:21 +02:00
Kconfig drm: Add simpledrm driver 2021-05-01 12:45:04 +02:00
Makefile drm: Add simpledrm driver 2021-05-01 12:45:04 +02:00
mi0283qt.c drm/mi0283qt: Avoid spamming logs if probe is deferred 2021-04-27 13:14:06 +02:00
repaper.c
simpledrm.c drm: simpledrm: fix a potential NULL dereference 2021-05-15 14:04:42 +02:00
st7586.c drm/st7586: Avoid spamming logs if probe is deferred 2021-04-27 13:13:56 +02:00
st7735r.c drm/st7735r: Avoid spamming logs if probe is deferred 2021-04-27 13:13:46 +02:00