Commit 72282a88 authored by Dan Carpenter's avatar Dan Carpenter Committed by Daniel Vetter

drm: zte: checking for NULL instead of IS_ERR()

drm_dev_alloc() never returns NULL, it only returns error pointers on
error.

Fixes: 0a886f59 ("drm: zte: add initial vou drm driver")
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/20161115095301.GC15424@mwanda
parent 35cf0350
...@@ -107,8 +107,8 @@ static int zx_drm_bind(struct device *dev) ...@@ -107,8 +107,8 @@ static int zx_drm_bind(struct device *dev)
return -ENOMEM; return -ENOMEM;
drm = drm_dev_alloc(&zx_drm_driver, dev); drm = drm_dev_alloc(&zx_drm_driver, dev);
if (!drm) if (IS_ERR(drm))
return -ENOMEM; return PTR_ERR(drm);
drm->dev_private = priv; drm->dev_private = priv;
dev_set_drvdata(dev, drm); dev_set_drvdata(dev, 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