]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/sti: avoid potential dereference of error pointers in sti_gdp_atomic_check
authorMa Ke <make24@iscas.ac.cn>
Mon, 9 Sep 2024 06:33:59 +0000 (14:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:24 +0000 (19:51 +0100)
commitf5804567cf9605d6e5ec46c0bb786f7d50f18c13
tree769f4e40fb0a9ab9a317f85ac3c89f9f6c778418
parent31c857e7496d34e5a32a6f75bc024d0b06fd646a
drm/sti: avoid potential dereference of error pointers in sti_gdp_atomic_check

commit e965e771b069421c233d674c3c8cd8c7f7245f42 upstream.

The return value of drm_atomic_get_crtc_state() needs to be
checked. To avoid use of error pointer 'crtc_state' in case
of the failure.

Cc: stable@vger.kernel.org
Fixes: dd86dc2f9ae1 ("drm/sti: implement atomic_check for the planes")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Acked-by: Alain Volmat <alain.volmat@foss.st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240909063359.1197065-1-make24@iscas.ac.cn
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/sti/sti_gdp.c