]> git.hungrycats.org Git - linux/commit
drm/omap: fix possible NULL ref issue in tiler_reserve_2d
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 29 Mar 2018 10:40:37 +0000 (13:40 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jul 2018 09:18:42 +0000 (11:18 +0200)
commit385963f49ded20d90f7af14a7ed567b27cb52801
treee7199d4c7a17a1ef8c77f29c261b96b70945b439
parentcbbc5cd1570802a90ad34fab4820d048be45f34f
drm/omap: fix possible NULL ref issue in tiler_reserve_2d

[ Upstream commit 6a0f0c55619f0b82a677cab72e77c3444a5eee58 ]

tiler_reserve_2d allocates memory but does not check if it got the
memory. Add the check and return ENOMEM on failure.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180329104038.29154-2-tomi.valkeinen@ti.com
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c