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:
d9d7a3e
)
drm/kirin: Checking for IS_ERR() instead of NULL
author
Dan Carpenter
<
[email protected]
>
Thu, 5 Oct 2017 12:57:51 +0000
(15:57 +0300)
committer
Sean Paul
<
[email protected]
>
Thu, 12 Oct 2017 18:09:45 +0000
(14:09 -0400)
The of_graph_get_remote_node() function doesn't return error pointers,
it returns NULL on error so I've updated the check.
Fixes: 86418f90a4c1 ("drm: convert drivers to use of_graph_get_remote_node")
Signed-off-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Sean Paul <
[email protected]
>
Link:
https://patchwork.freedesktop.org/patch/msgid/20171005125751.jvtjms62vbtxuvak@mwanda
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
index c19ab4f91ae7a79b1612e9ad62bdd0a7ecea37cc..ddb0403f1975e690a415cdbeb3fa12aded8b5744 100644
(file)
--- a/
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
+++ b/
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
@@
-237,8
+237,8
@@
static int kirin_drm_platform_probe(struct platform_device *pdev)
}
remote = of_graph_get_remote_node(np, 0, 0);
- if (
IS_ERR(remote)
)
- return
PTR_ERR(remote)
;
+ if (
!remote
)
+ return
-ENODEV
;
drm_of_component_match_add(dev, &match, compare_of, remote);
of_node_put(remote);