From: zhong jiang Date: Tue, 11 Sep 2018 11:54:35 +0000 (+0800) Subject: drm/omap: Use ERR_CAST directly instead of ERR_PTR(PTR_ERR()) X-Git-Tag: v5.4-rc1~2273^2~17^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=993d52e2f71560d539b3f194be2970eb9d8ce9c1;p=platform%2Fkernel%2Flinux-rpi.git drm/omap: Use ERR_CAST directly instead of ERR_PTR(PTR_ERR()) 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 Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c index 19fc4df..1aaf260 100644 --- a/drivers/gpu/drm/omapdrm/dss/dss.c +++ b/drivers/gpu/drm/omapdrm/dss/dss.c @@ -947,7 +947,7 @@ dss_debugfs_create_file(struct dss_device *dss, const char *name, &dss_debug_fops); if (IS_ERR(d)) { kfree(entry); - return ERR_PTR(PTR_ERR(d)); + return ERR_CAST(d); } entry->dentry = d;