From: Sean Paul <seanpaul@chromium.org>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: 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,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: Fix return value check in kirin_drm_platform_probe()
Date: Wed, 11 Oct 2017 13:30:28 -0400 [thread overview]
Message-ID: <20171011173028.lvtwcs7sbc5eqo44@art_vandelay> (raw)
In-Reply-To: <1507720636-129038-1-git-send-email-weiyongjun1@huawei.com>
On Wed, Oct 11, 2017 at 11:17:16AM +0000, Wei Yongjun wrote:
> 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>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
> ---
> 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);
>
>
>
--
Sean Paul, Software Engineer, Google / Chromium OS
next prev parent reply other threads:[~2017-10-11 17:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 11:17 Wei Yongjun
2017-10-11 17:30 ` Sean Paul [this message]
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=20171011173028.lvtwcs7sbc5eqo44@art_vandelay \
--to=seanpaul@chromium.org \
--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=treding@nvidia.com \
--cc=weiyongjun1@huawei.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®