From 993d52e2f71560d539b3f194be2970eb9d8ce9c1 Mon Sep 17 00:00:00 2001 From: zhong jiang Date: Tue, 11 Sep 2018 19:54:35 +0800 Subject: [PATCH] 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 --- 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 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; -- 2.7.4