[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <cacf72077e471632a52369656529df860961f0e1.1469588473.git.salah.triki@gmail.com>
Date: Wed, 27 Jul 2016 04:11:55 +0100
From: Salah Triki <salah.triki@...il.com>
To: akpm@...ux-foundation.org, viro@...IV.linux.org.uk
Cc: luisbg@....samsung.com, mhocko@...e.com, vdavydov@...tuozzo.com,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
salah.triki@...il.com
Subject: [RESEND PATCH 4/4] fs: befs: Remove goto from befs_bread_iaddr
Since goto statement merely returns NULL, replace it with return
statement.
Signed-off-by: Salah Triki <salah.triki@...il.com>
---
fs/befs/io.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/fs/befs/io.c b/fs/befs/io.c
index 4223b77..af631a6 100644
--- a/fs/befs/io.c
+++ b/fs/befs/io.c
@@ -37,7 +37,7 @@ befs_bread_iaddr(struct super_block *sb, befs_inode_addr iaddr)
if (iaddr.allocation_group > befs_sb->num_ags) {
befs_error(sb, "BEFS: Invalid allocation group %u, max is %u",
iaddr.allocation_group, befs_sb->num_ags);
- goto error;
+ return NULL;
}
block = iaddr2blockno(sb, &iaddr);
@@ -49,13 +49,9 @@ befs_bread_iaddr(struct super_block *sb, befs_inode_addr iaddr)
if (bh == NULL) {
befs_error(sb, "Failed to read block %lu",
(unsigned long)block);
- goto error;
+ return NULL;
}
befs_debug(sb, "<--- %s", __func__);
return bh;
-
- error:
- befs_debug(sb, "<--- %s ERROR", __func__);
- return NULL;
}
--
1.9.1
Powered by blists - more mailing lists