drm/cirrus: NULL-check pipe->plane.state->fb in cirrus_pipe_update()
authorAlexandr Sapozhnikov <alsp705@gmail.com>
Wed, 15 Feb 2023 17:15:49 +0000 (20:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2023 10:47:52 +0000 (12:47 +0200)
commit3e9aac5e935f7e9c040b29f3ba6b6e8f5e7b3a27
tree775babc4e471101a3191ee4a0a7b0373ebddc5b7
parenta4c639012ad0f00bfcbe07048a38d9cff2cd780a
drm/cirrus: NULL-check pipe->plane.state->fb in cirrus_pipe_update()

[ Upstream commit 7245e629dcaaf308f1868aeffa218e9849c77893 ]

After having been compared to NULL value at cirrus.c:455, pointer
'pipe->plane.state->fb' is passed as 1st parameter in call to function
'cirrus_fb_blit_rect' at cirrus.c:461, where it is dereferenced at
cirrus.c:316.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

v2:
* aligned commit message to line-length limits

Signed-off-by: Alexandr Sapozhnikov <alsp705@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215171549.16305-1-alsp705@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/tiny/cirrus.c