From: Wei Yongjun <weiyongjun1@huawei.com>
To: Xinliang Liu <z.liuxinliang@hisilicon.com>,
<zourongrong@gmail.com>, <kong.kongxinwei@hisilicon.com>,
<puck.chen@hisilicon.com>, <airlied@linux.ie>, <robh@kernel.org>,
<rmk+kernel@armlinux.org.uk>, <treding@nvidia.com>,
<arnd@arndb.de>, <daniel.vetter@ffwll.ch>,
<seanpaul@chromium.org>, <krisman@collabora.co.uk>,
<jsarha@ti.com>, <noralf@tronnes.org>
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] drm: Fix return value check in kirin_drm_platform_probe()
Date: Wed, 11 Oct 2017 11:17:16 +0000 [thread overview]
Message-ID: <1507720636-129038-1-git-send-email-weiyongjun1@huawei.com> (raw)
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@huawei.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);
next reply other threads:[~2017-10-11 11:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 11:17 Wei Yongjun [this message]
2017-10-11 17:30 ` Sean Paul
2017-10-12 6:39 ` Gabriel Krisman Bertazi
2017-10-12 14:42 ` Sean Paul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1507720636-129038-1-git-send-email-weiyongjun1@huawei.com \
--to=weiyongjun1@huawei.com \
--cc=airlied@linux.ie \
--cc=arnd@arndb.de \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=kong.kongxinwei@hisilicon.com \
--cc=krisman@collabora.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=noralf@tronnes.org \
--cc=puck.chen@hisilicon.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh@kernel.org \
--cc=seanpaul@chromium.org \
--cc=treding@nvidia.com \
--cc=z.liuxinliang@hisilicon.com \
--cc=zourongrong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®