From: AKASHI Takahiro <takahiro.akashi@linaro.org>
Date: Mon, 7 Oct 2019 05:59:36 +0000 (+0900)
Subject: fs: clean up around fs_type
X-Git-Tag: v2025.01-rc5-pxa1908~2740^2~3
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/kyber.dk/phpMyBuilder/static/%7B%7B%20.RelPermalink%20%7D%7D?a=commitdiff_plain;h=185aed7855573214794b13f20e597d36c6dc5760;p=u-boot.git

fs: clean up around fs_type

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>
---

diff --git a/fs/fs.c b/fs/fs.c
index 64ba25fea8..b17b76a46a 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;