Skip to content

Commit

Permalink
block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
Browse files Browse the repository at this point in the history
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Duan Jiong authored and Jens Axboe committed Apr 11, 2014
1 parent cb2da43 commit 21f9fcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +1654,7 @@ static int __init fail_make_request_debugfs(void)
struct dentry *dir = fault_create_debugfs_attr("fail_make_request",
NULL, &fail_make_request);

return IS_ERR(dir) ? PTR_ERR(dir) : 0;
return PTR_ERR_OR_ZERO(dir);
}

late_initcall(fail_make_request_debugfs);
Expand Down

0 comments on commit 21f9fcd

Please sign in to comment.