Skip to content

Commit

Permalink
drm/kirin: Checking for IS_ERR() instead of NULL
Browse files Browse the repository at this point in the history
The of_graph_get_remote_node() function doesn't return error pointers,
it returns NULL on error so I've updated the check.

Fixes: 86418f9 ("drm: convert drivers to use of_graph_get_remote_node")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171005125751.jvtjms62vbtxuvak@mwanda
  • Loading branch information
Dan Carpenter authored and Sean Paul committed Oct 12, 2017
1 parent d9d7a3e commit 7af35b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 7af35b0

Please sign in to comment.