drm/imx/lcdc: fix a NULL vs IS_ERR() bug in probe
authorDan Carpenter <error27@gmail.com>
Wed, 22 Mar 2023 09:06:55 +0000 (12:06 +0300)
committerJavier Martinez Canillas <javierm@redhat.com>
Sat, 15 Apr 2023 21:48:48 +0000 (23:48 +0200)
commitdae2f7b89a8436351a2982d0d96a8a56accca576
tree772a24adcb6a95b8d72f13723cbecdb21f4ed7e9
parentebb7619d3ac85d7aae0a5e8d7038d32211ca7dba
drm/imx/lcdc: fix a NULL vs IS_ERR() bug in probe

The devm_drm_dev_alloc() function returns error pointers.  It never
returns NULL.  Fix the check.

Fixes: c87e859cdeb5 ("drm/imx/lcdc: Implement DRM driver for imx25")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d0a1fc55-3ef6-444e-b3ef-fdc937d8d57a@kili.mountain
drivers/gpu/drm/imx/lcdc/imx-lcdc.c