drm: atmel-hlcdc: fix a NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Apr 2016 09:04:54 +0000 (12:04 +0300)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 1 Jun 2016 13:59:36 +0000 (15:59 +0200)
commit58a2ab3af722550b2e4e8155eb08660e16c20ee6
tree5685d16d65ee605b438678179238303128a964da
parentc2e4c99444f418b3c3b13b58dad4d951aa2f7f1b
drm: atmel-hlcdc: fix a NULL check

If kmalloc() returned NULL we would end up dereferencing "state" a
couple lines later.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c