Commit e89e50ac authored by Dan Carpenter's avatar Dan Carpenter Committed by Daniel Vetter

drm: mxsfb: drm_dev_alloc() returns error pointers

We should be checking for IS_ERR() instead of NULL because
drm_dev_alloc() returns error pointers.

Fixes: 45d59d70 ("drm: Add new driver for MXSFB controller")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161213122332.GA7519@elgon.mountain
parent 010f5b9f
...@@ -395,8 +395,8 @@ static int mxsfb_probe(struct platform_device *pdev) ...@@ -395,8 +395,8 @@ static int mxsfb_probe(struct platform_device *pdev)
pdev->id_entry = of_id->data; pdev->id_entry = of_id->data;
drm = drm_dev_alloc(&mxsfb_driver, &pdev->dev); drm = drm_dev_alloc(&mxsfb_driver, &pdev->dev);
if (!drm) if (IS_ERR(drm))
return -ENOMEM; return PTR_ERR(drm);
ret = mxsfb_load(drm, 0); ret = mxsfb_load(drm, 0);
if (ret) if (ret)
......
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