From: Richard Genoud <richard.genoud@posteo.net>
Date: Tue, 3 Nov 2020 11:11:10 +0000 (+0100)
Subject: fs/squashfs: sqfs_size: remove useless sqfs_closedir()
X-Git-Tag: v2025.01-rc5-pxa1908~2121^2~14
X-Git-Url: http://git.dujemihanovic.xyz/html/static/gitweb.css?a=commitdiff_plain;h=35475f83a107901551c31f7bc70f5266862a33e4;p=u-boot.git

fs/squashfs: sqfs_size: remove useless sqfs_closedir()

as sqfs_opendir failed, there's no need to call sqfs_closedir

Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
---

diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index 3b008b5235..f4cac3e4bf 100644
--- a/fs/squashfs/sqfs.c
+++ b/fs/squashfs/sqfs.c
@@ -1557,7 +1557,6 @@ int sqfs_size(const char *filename, loff_t *size)
 	 */
 	ret = sqfs_opendir(dir, &dirsp);
 	if (ret) {
-		sqfs_closedir(dirsp);
 		ret = -EINVAL;
 		goto free_strings;
 	}