]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
fs/squashfs: Set ret to 0 on successful read
authorMichael Zimmermann <sigmaepsilon92@gmail.com>
Mon, 20 Apr 2026 16:35:31 +0000 (18:35 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 24 Apr 2026 17:28:10 +0000 (11:28 -0600)
It might still be a positive number due to the call to sqfs_disk_read.
This only happens when reading a file from an uncompressed squashfs.

I found this by trying to boot using the extlinux bootmethod, where
positive values are treated as errors.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
Acked-by: Richard Genoud <richard.genoud@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
fs/squashfs/sqfs.c

index 543db8c7e9ec258e5c09df58f879d13fb7b70a63..0768fc4a7b28b6e73cb1fd1abde9207ebd91c0d8 100644 (file)
@@ -1636,6 +1636,8 @@ static int sqfs_read_nest(const char *filename, void *buf, loff_t offset,
                *actread = finfo.size;
        }
 
+       ret = 0;
+
 out:
        free(fragment);
        free(datablock);