drm/mediatek: check for memory allocation failure
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Fri, 9 Jun 2017 19:27:12 +0000 (21:27 +0200)
committerCK Hu <ck.hu@mediatek.com>
Tue, 27 Jun 2017 09:34:53 +0000 (17:34 +0800)
commit4a3bfb5c24306aa129c0de32e5d1ffb553a60a7c
treee713f3d168aedaf5c94265cff2074572b1199936
parentafd89636f1846ec2c340de894dac103cd336fcee
drm/mediatek: check for memory allocation failure

If 'devm_kmalloc_array' returns NULL, we should return -ENOMEM as already
done a few lines above instead of deferencing a NULL pointer a few lines
below.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: CK Hu <ck.hu@mediatek.com>
drivers/gpu/drm/mediatek/mtk_drm_crtc.c