]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/stm: ltdc: check memory returned by devm_kzalloc()
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Wed, 31 May 2023 07:28:54 +0000 (10:28 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:08 +0000 (16:29 +0200)
commitfc8b0b8dbdbacc642f3b0ae8a579fdb28c5eea61
tree108bea0c136a3460ab19cc0b9724b44381d65f41
parent6e513c2e94606d5a939bf9b32662f639f3a7dc7a
drm/stm: ltdc: check memory returned by devm_kzalloc()

[ Upstream commit fd39730c58890cd7f0a594231e19bb357f28877c ]

devm_kzalloc() can fail and return NULL pointer. Check its return status.
Identified with Coccinelle (kmerr.cocci script).

Fixes: 484e72d3146b ("drm/stm: ltdc: add support of ycbcr pixel formats")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230531072854.142629-1-claudiu.beznea@microchip.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/stm/ltdc.c