fs/squashfs: sqfs_size: remove useless sqfs_closedir()
authorRichard Genoud <richard.genoud@posteo.net>
Tue, 3 Nov 2020 11:11:10 +0000 (12:11 +0100)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 15 Nov 2021 10:37:12 +0000 (11:37 +0100)
as sqfs_opendir failed, there's no need to call sqfs_closedir

Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit 35475f83a107901551c31f7bc70f5266862a33e4]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I809ae83d5949f86d547b52982cf318e7202a6868

fs/squashfs/sqfs.c

index c3b662e..79a465e 100644 (file)
@@ -1560,7 +1560,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;
        }