projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35cf035
)
drm: zte: checking for NULL instead of IS_ERR()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Tue, 15 Nov 2016 09:53:01 +0000
(12:53 +0300)
committer
Daniel Vetter
<daniel.vetter@ffwll.ch>
Tue, 15 Nov 2016 10:00:42 +0000
(11:00 +0100)
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
drivers/gpu/drm/zte/zx_drm_drv.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/zte/zx_drm_drv.c
b/drivers/gpu/drm/zte/zx_drm_drv.c
index abc8099e6f53b6fc7e6a2926c97cd82791e38f44..3e76f72c92fffc61c960f618934652ab46a3c727 100644
(file)
--- 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);