From 7af35b0addbc6b8573e11106dfd3e21adf38f405 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 5 Oct 2017 15:57:51 +0300 Subject: drm/kirin: Checking for IS_ERR() instead of NULL 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 Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20171005125751.jvtjms62vbtxuvak@mwanda --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/drm/hisilicon') diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index c19ab4f91ae7..ddb0403f1975 100644 --- 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); -- cgit v1.2.3