[PATCH 6/7] ocfs2: One function call less in ocfs2_init_slot_info() after error detection

SF Markus Elfring
2015-02-21T19:49:20Z

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 21 Feb 2015 19:49:50 +0100

The __ocfs2_free_slot_info() function was called by the ocfs2_init_slot_info()
function even if a call of the kzalloc() function failed.

Return from this implementation directly after corresponding
exception handling.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
fs/ocfs2/slot_map.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/slot_map.c b/fs/ocfs2/slot_map.c
index c5e530a..e78a203 100644
--- a/fs/ocfs2/slot_map.c
+++ b/fs/ocfs2/slot_map.c
@@ -427,7 +427,7 @@ int ocfs2_init_slot_info(struct ocfs2_super *osb)
if (!si) {
status = -ENOMEM;
mlog_errno(status);
- goto bail;
+ return status;
}

si->si_extended = ocfs2_uses_extended_slot_map(osb);
--
2.3.0