From: Richard Genoud <richard.genoud@posteo.net>
Date: Tue, 3 Nov 2020 11:11:22 +0000 (+0100)
Subject: fs/squashfs: sqfs_probe: use sqfs_decompressor_init() return value
X-Git-Tag: v2025.01-rc5-pxa1908~2121^2~3
X-Git-Url: http://git.dujemihanovic.xyz/%22/icons/right.gif/static/%7B%7B%20.Permalink%20%7D%7D?a=commitdiff_plain;h=6d25bd3e9c1d317cdbd52a4c6bba11f912bb4d6a;p=u-boot.git

fs/squashfs: sqfs_probe: use sqfs_decompressor_init() return value

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

diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index 96806a4a31..435081638b 100644
--- a/fs/squashfs/sqfs.c
+++ b/fs/squashfs/sqfs.c
@@ -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;
 	}