[PATCH] block: blk-timeout: Use PTR_RET function

From: Alexandru Gheorghiu
Date: Wed Apr 10 2013 - 17:54:26 EST


Use PTR_RET function instead of IS_ERR and PTR_ERR.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@xxxxxxxxx>
---
block/blk-timeout.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 6e4744c..2a6aba0 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -31,7 +31,7 @@ static int __init fail_io_timeout_debugfs(void)
struct dentry *dir = fault_create_debugfs_attr("fail_io_timeout",
NULL, &fail_io_timeout);

- return IS_ERR(dir) ? PTR_ERR(dir) : 0;
+ return PTR_RET(dir);
}

late_initcall(fail_io_timeout_debugfs);
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/