public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/kirin: Checking for IS_ERR() instead of NULL
@ 2017-10-05 12:57 Dan Carpenter
  2017-10-12 14:43 ` Sean Paul
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-10-05 12:57 UTC (permalink / raw)
  To: Xinliang Liu, Rob Herring
  Cc: Rongrong Zou, Xinwei Kong, Chen Feng, David Airlie, Daniel Vetter,
	Sean Paul, Gabriel Krisman Bertazi, Jyri Sarha, Thierry Reding,
	Jani Nikula, Russell King, Arnd Bergmann, dri-devel,
	kernel-janitors

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 <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
index e27352ca26c4..527aa58485fa 100644
--- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
@@ -236,8 +236,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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-12 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-05 12:57 [PATCH] drm/kirin: Checking for IS_ERR() instead of NULL Dan Carpenter
2017-10-12 14:43 ` Sean Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox