drm/omap: fix possible NULL ref issue in tiler_reserve_2d
commit6a0f0c55619f0b82a677cab72e77c3444a5eee58
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 29 Mar 2018 10:40:37 +0000 (29 13:40 +0300)
committerSean Paul <seanpaul@chromium.org>
Mon, 7 May 2018 14:19:11 +0000 (7 10:19 -0400)
tree959edfff134abde59758bb4750b222e363b52720
parent77eeac24b10fc84d3ffd5b11a897dff88dde244d
drm/omap: fix possible NULL ref issue in tiler_reserve_2d

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>
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c