Commit dae2f7b8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Javier Martinez Canillas

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: c87e859c ("drm/imx/lcdc: Implement DRM driver for imx25")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d0a1fc55-3ef6-444e-b3ef-fdc937d8d57a@kili.mountain
parent ebb7619d
......@@ -400,8 +400,8 @@ static int imx_lcdc_probe(struct platform_device *pdev)
lcdc = devm_drm_dev_alloc(dev, &imx_lcdc_drm_driver,
struct imx_lcdc, drm);
if (!lcdc)
return -ENOMEM;
if (IS_ERR(lcdc))
return PTR_ERR(lcdc);
drm = &lcdc->drm;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment