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-Url: http://git.maquefel.me/?a=commitdiff_plain;h=993d52e2f71560d539b3f194be2970eb9d8ce9c1;p=linux.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 19fc4dfc429ee..1aaf260aa9b86 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;