fs: fat: simplify gotos from read_bootsectandvi
This simplifies the code a little bit.
Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index c368c3b..77f225c 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -531,7 +531,8 @@
if (disk_read(0, 1, block) < 0) {
debug("Error: reading block\n");
- goto fail;
+ ret = -1;
+ goto out_free;
}
memcpy(bs, block, sizeof(boot_sector));
@@ -556,10 +557,8 @@
*fatsize = determine_legacy_fat_bits(bs);
}
memcpy(volinfo, vistart, sizeof(volume_info));
- goto exit;
-fail:
- ret = -1;
-exit:
+
+out_free:
free(block);
return ret;
}