]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fs: clean up around fs_type
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Mon, 7 Oct 2019 05:59:36 +0000 (14:59 +0900)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 17 Oct 2019 17:19:56 +0000 (19:19 +0200)
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@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
fs/fs.c

diff --git a/fs/fs.c b/fs/fs.c
index 64ba25fea8bf3622dda1bdf6b71a1179177c1be9..b17b76a46ae0e7bd92148091d9fd537ff1d32c50 100644 (file)
--- 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;