gpu: Use ERR_CAST to replace ERR_PTR(PTR_ERR())
Subsystems (3)
PATCH 1/1 gpu: Use ERR_CAST to replace ERR_PTR(PTR_ERR())
We prefer to ERR_CAST rather than ERR_PTR(PTR_ERR()), So just replace it.
The issue is detected with the help of Coccinelle
Signed-off-by zhong jiang <[email protected]>
--- drivers/gpu/drm/omapdrm/dss/dss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/omapdrm/dss/dss.c +1 -1
@@ -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;
Signature · 1 line
1.7.12.4
Hi Zhong Jiang,
Thank you for the patch.
Quoted 6 lines · On Saturday, 18 August 2018 13:57:12 EEST zhong jiang wrote:
We prefer to
ERR_CASTrather than ERR_PTR(PTR_ERR()), So just replace it.The issue is detected with the help of Coccinelle
Signed-off-by zhong jiang <[email protected]>
Reviewed-by Laurent Pinchart <[email protected]>
Quoted 17 lines
--- drivers/gpu/drm/omapdrm/dss/dss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/gpu/drm/omapdrm/dss/dss.cindex cb80dda..1fc46b2 100644drivers/gpu/drm/omapdrm/dss/dss.c +1
-1@@ -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;
Signature · 3 lines
Regards, Laurent Pinchart