]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fs/squashfs: sqfs_probe: use sqfs_decompressor_init() return value
authorRichard Genoud <richard.genoud@posteo.net>
Tue, 3 Nov 2020 11:11:22 +0000 (12:11 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 19 Nov 2020 14:45:49 +0000 (09:45 -0500)
sqfs_decompressor_init() returns a value, so it's better to use it than
to force the return value to EINVAL (it could be ENOMEM)

Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
fs/squashfs/sqfs.c

index 96806a4a31d814d46a67f409a05fb9b821f8d285..435081638b8c00528f4e87f8c5dbd45d8f838ad3 100644 (file)
@@ -1097,9 +1097,7 @@ int sqfs_probe(struct blk_desc *fs_dev_desc, struct disk_partition *fs_partition
        ctxt.sblk = sblk;
 
        ret = sqfs_decompressor_init(&ctxt);
-
        if (ret) {
-               ret = -EINVAL;
                goto error;
        }