[PATCH v2 24/28] fs/squashfs: sqfs_probe: use sqfs_decompressor_init() return value

Richard Genoud richard.genoud at posteo.net
Tue Nov 3 12:11:22 CET 2020


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)

Signed-off-by: Richard Genoud <richard.genoud at posteo.net>
---
 fs/squashfs/sqfs.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index 9682ea52557..fa3120aefd6 100644
--- a/fs/squashfs/sqfs.c
+++ b/fs/squashfs/sqfs.c
@@ -1098,9 +1098,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;
 	}
 


More information about the U-Boot mailing list