Thread (3 messages) 3 messages, 3 authors, 2018-08-01

Re: [PATCH] btrfs: backref.c: Use ERR_CAST() to return error code

From: Nikolay Borisov <hidden>
Date: 2018-07-30 15:51:27


On 26.07.2018 04:22, Misono Tomohiro wrote:
Use ERR_CAST() instead of void * to make meaning clear.

Signed-off-by: Misono Tomohiro <redacted>
Reviewed-by: Nikolay Borisov <redacted>
quoted hunk ↗ jump to hunk
---
 fs/btrfs/backref.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 7ce0b5f9e99e..9f231bbccb1e 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -2231,7 +2231,7 @@ struct inode_fs_paths *init_ipath(s32 total_bytes, struct btrfs_root *fs_root,
 
 	fspath = init_data_container(total_bytes);
 	if (IS_ERR(fspath))
-		return (void *)fspath;
+		return ERR_CAST(fspath);
 
 	ifp = kmalloc(sizeof(*ifp), GFP_KERNEL);
 	if (!ifp) {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help