drm: zte: checking for NULL instead of IS_ERR()
drm_dev_alloc() never returns NULL, it only returns error pointers on
error.
Fixes: 0a886f5952
("drm: zte: add initial vou drm driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161115095301.GC15424@mwanda
This commit is contained in:
parent
35cf03508d
commit
72282a88d4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user