From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: zhong jiang <zhongjiang@huawei.com>
Cc: tomi.valkeinen@ti.com, airlied@linux.ie, sre@kernel.org,
afd@ti.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpu: Use ERR_CAST to replace ERR_PTR(PTR_ERR())
Date: Sun, 19 Aug 2018 13:49:24 +0300 [thread overview]
Message-ID: <1568006.WDkDHT9mlz@avalon> (raw)
In-Reply-To: <1534589832-65325-1-git-send-email-zhongjiang@huawei.com>
Hi Zhong Jiang,
Thank you for the patch.
On Saturday, 18 August 2018 13:57:12 EEST zhong jiang wrote:
> We prefer to ERR_CAST rather than ERR_PTR(PTR_ERR()), So just
> replace it.
>
> The issue is detected with the help of Coccinelle
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/omapdrm/dss/dss.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c
> b/drivers/gpu/drm/omapdrm/dss/dss.c index cb80dda..1fc46b2 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dss.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dss.c
> @@ -956,7 +956,7 @@ struct dss_debugfs_entry *
> &dss_debug_fops);
> if (IS_ERR(d)) {
> kfree(entry);
> - return ERR_PTR(PTR_ERR(d));
> + return ERR_CAST(d);
> }
>
> entry->dentry = d;
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2018-08-19 10:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-18 10:57 [PATCH] gpu: Use ERR_CAST to replace ERR_PTR(PTR_ERR()) zhong jiang
2018-08-19 10:49 ` Laurent Pinchart [this message]
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=1568006.WDkDHT9mlz@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=afd@ti.com \
--cc=airlied@linux.ie \
--cc=linux-kernel@vger.kernel.org \
--cc=sre@kernel.org \
--cc=tomi.valkeinen@ti.com \
--cc=zhongjiang@huawei.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;
as well as URLs for NNTP newsgroup(s).