[PATCH] dma-buf: Cocci spatch "ptr_ret.spatch"

Thomas Meyer thomas at m3y3r.de
Sat Jun 1 02:53:10 PDT 2013


Signed-off-by: Thomas Meyer <thomas at m3y3r.de>
---

diff -u -p a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c
--- a/drivers/base/dma-buf.c
+++ b/drivers/base/dma-buf.c
@@ -680,10 +680,7 @@ int dma_buf_debugfs_create_file(const ch
 	d = debugfs_create_file(name, S_IRUGO, dma_buf_debugfs_dir,
 			write, &dma_buf_debug_fops);
 
-	if (IS_ERR(d))
-		return PTR_ERR(d);
-
-	return 0;
+	return PTR_RET(d);
 }
 #else
 static inline int dma_buf_init_debugfs(void)




More information about the dri-devel mailing list