drm/omap: Potential NULL deref in omap_crtc_duplicate_state()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 11 Aug 2017 20:16:06 +0000 (23:16 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 16 Aug 2017 13:21:18 +0000 (16:21 +0300)
commit2419672f4c96ca678a95d0f733f44d3ee036b5c8
tree12f127f22ffad39fd641287d68b4f7ff8b90faf5
parent4161f200ff380b0703c7bfa8df9615cc7fd76ba7
drm/omap: Potential NULL deref in omap_crtc_duplicate_state()

If the kmalloc() fails then we dereference "state" when we set
"state->zpos".

Fixes: 3dfeb631a15d ("drm/omap: Rework the rotation-on-crtc hack")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/omap_crtc.c