lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1507720636-129038-1-git-send-email-weiyongjun1@huawei.com>
Date:   Wed, 11 Oct 2017 11:17:16 +0000
From:   Wei Yongjun <weiyongjun1@...wei.com>
To:     Xinliang Liu <z.liuxinliang@...ilicon.com>,
        <zourongrong@...il.com>, <kong.kongxinwei@...ilicon.com>,
        <puck.chen@...ilicon.com>, <airlied@...ux.ie>, <robh@...nel.org>,
        <rmk+kernel@...linux.org.uk>, <treding@...dia.com>,
        <arnd@...db.de>, <daniel.vetter@...ll.ch>, <seanpaul@...omium.org>,
        <krisman@...labora.co.uk>, <jsarha@...com>, <noralf@...nnes.org>
CC:     Wei Yongjun <weiyongjun1@...wei.com>,
        <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] drm: Fix return value check in kirin_drm_platform_probe()

In case of error, the function of_graph_get_remote_node() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test..

Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
index e27352c..527aa58 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);



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ