提交 72282a88 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161115095301.GC15424@mwanda
上级 35cf0350
......@@ -107,8 +107,8 @@ static int zx_drm_bind(struct device *dev)
return -ENOMEM;
drm = drm_dev_alloc(&zx_drm_driver, dev);
if (!drm)
return -ENOMEM;
if (IS_ERR(drm))
return PTR_ERR(drm);
drm->dev_private = priv;
dev_set_drvdata(dev, drm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册