From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Pinchart Subject: Re: [PATCH] drm/omap: Use ERR_CAST directly instead of RR_PTR(PTR_ERR()) Date: Wed, 12 Sep 2018 00:19:58 +0300 Message-ID: <2081575.ibfeOaj4ye@avalon> References: <1536666875-11252-1-git-send-email-zhongjiang@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: <1536666875-11252-1-git-send-email-zhongjiang@huawei.com> Sender: linux-kernel-owner@vger.kernel.org To: zhong jiang Cc: airlied@linux.ie, tomi.valkeinen@ti.com, sre@kernel.org, afd@ti.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org Hi Zhong Jiang, Thank you for the patch. On Tuesday, 11 September 2018 14:54:35 EEST 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 Reviewed-by: Laurent Pinchart I expect Tomi to take this patch in his tree, but I also applied it to mine to make sure it won't be forgotten. > --- > 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