[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6e941d99-4e32-3ae0-31ed-402fba62f2a8@ti.com>
Date: Wed, 26 Sep 2018 12:08:27 +0300
From: Tomi Valkeinen <tomi.valkeinen@...com>
To: zhong jiang <zhongjiang@...wei.com>, <airlied@...ux.ie>
CC: <sre@...nel.org>, <laurent.pinchart@...asonboard.com>,
<afd@...com>, <dri-devel@...ts.freedesktop.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/omap: Use ERR_CAST directly instead of
RR_PTR(PTR_ERR())
On 11/09/18 14:54, zhong jiang wrote:
> We prefer to use ERR_CAST to do so.
> The issue is detected with the help of Coccinelle.
>
> Signed-off-by: zhong jiang <zhongjiang@...wei.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;
>
Thanks, picked this up.
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Powered by blists - more mailing lists