[U-Boot] [PATCH v4 2/5] fs: clean up around fs_type

AKASHI Takahiro takahiro.akashi at linaro.org
Mon Oct 7 05:59:36 UTC 2019


fs_ls(), fs_mkdir() and fs_unlink() sets fs_type to FS_TYPE_ANY
explicitly, but it is redundant as they call fs_close().
So just remove those lines.

Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
 fs/fs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/fs.c b/fs/fs.c
index 64ba25fea8bf..b17b76a46ae0 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -413,7 +413,6 @@ int fs_ls(const char *dirname)
 
 	ret = info->ls(dirname);
 
-	fs_type = FS_TYPE_ANY;
 	fs_close();
 
 	return ret;
@@ -597,7 +596,6 @@ int fs_unlink(const char *filename)
 
 	ret = info->unlink(filename);
 
-	fs_type = FS_TYPE_ANY;
 	fs_close();
 
 	return ret;
@@ -611,7 +609,6 @@ int fs_mkdir(const char *dirname)
 
 	ret = info->mkdir(dirname);
 
-	fs_type = FS_TYPE_ANY;
 	fs_close();
 
 	return ret;
-- 
2.21.0



More information about the U-Boot mailing list