diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-11-15 12:53:01 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-11-15 11:00:42 +0100 |
commit | 72282a88d4ea2c0f3e520fab34db56af7119f6e7 (patch) | |
tree | afdef465b57778cd26449614e8767dba371a9007 /drivers/gpu/drm/zte | |
parent | 35cf03508d8466ecc5199c9d609e74e85bec785b (diff) | |
download | op-kernel-dev-72282a88d4ea2c0f3e520fab34db56af7119f6e7.zip op-kernel-dev-72282a88d4ea2c0f3e520fab34db56af7119f6e7.tar.gz |
drm: zte: checking for NULL instead of IS_ERR()
drm_dev_alloc() never returns NULL, it only returns error pointers on
error.
Fixes: 0a886f59528a ("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
Diffstat (limited to 'drivers/gpu/drm/zte')
-rw-r--r-- | drivers/gpu/drm/zte/zx_drm_drv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c index abc8099..3e76f72 100644 --- a/drivers/gpu/drm/zte/zx_drm_drv.c +++ b/drivers/gpu/drm/zte/zx_drm_drv.c @@ -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); |