drm/omap: fix possible NULL ref issue in tiler_reserve_2d
authorTomi Valkeinen <[email protected]>
Thu, 29 Mar 2018 10:40:37 +0000 (13:40 +0300)
committerSean Paul <[email protected]>
Mon, 7 May 2018 14:19:11 +0000 (10:19 -0400)
commit6a0f0c55619f0b82a677cab72e77c3444a5eee58
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 <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c