drm/arm/malidp: Fix possible dereference of NULL
authorShailendra Verma <shailendra.v@samsung.com>
Fri, 11 Nov 2016 13:35:00 +0000 (13:35 +0000)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Mon, 23 Jan 2017 09:46:24 +0000 (09:46 +0000)
commit94d8b9b75c6118075ed54ad2fa0bea03c0f27145
treeba120c37956ee714f3663c0be411ae3357b7bcf8
parentf0493e653f9679114d1dfd54ab88b54ce95576e1
drm/arm/malidp: Fix possible dereference of NULL

There is possible deference of NULL pointer on return of
malidp_duplicate_plane_state() if kmalloc fails. Check the
returned kmalloc pointer before continuing.

Signed-off-by: Shailendra Verma <Shailendra.v@samsung.com>
[cleaned up the code and re-formatted the commit message]
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
drivers/gpu/drm/arm/malidp_planes.c