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:
a18e662
)
drm/vgem: Fix return value check in vgem_init()
author
Wei Yongjun
<
[email protected]
>
Sun, 21 May 2017 01:19:39 +0000
(
01:19
+0000)
committer
Daniel Vetter
<
[email protected]
>
Mon, 22 May 2017 07:47:34 +0000
(09:47 +0200)
In case of error, the function platform_device_register_simple() returns
ERR_PTR() and never returns NULL. The NULL test in the return value
check should be replaced with IS_ERR().
Fixes: af33a9190d02 ("drm/vgem: Enable dmabuf import interfaces")
Signed-off-by: Wei Yongjun <
[email protected]
>
Reviewed-by: Chris Wilson <
[email protected]
>
[danvet: Fix fixes: tag per Chris' review.]
Signed-off-by: Daniel Vetter <
[email protected]
>
Link:
http://patchwork.freedesktop.org/patch/msgid/
[email protected]
drivers/gpu/drm/vgem/vgem_drv.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/vgem/vgem_drv.c
b/drivers/gpu/drm/vgem/vgem_drv.c
index 54ec94c5e9acfce3b1ffa0c3c5518b5ad08fce24..18f401b442c2d0c334e1f879a8b9d9b0892d5306 100644
(file)
--- a/
drivers/gpu/drm/vgem/vgem_drv.c
+++ b/
drivers/gpu/drm/vgem/vgem_drv.c
@@
-438,8
+438,8
@@
static int __init vgem_init(void)
vgem_device->platform =
platform_device_register_simple("vgem", -1, NULL, 0);
- if (
!vgem_device->platform
) {
- ret =
-ENODEV
;
+ if (
IS_ERR(vgem_device->platform)
) {
+ ret =
PTR_ERR(vgem_device->platform)
;
goto out_fini;
}