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

João Marcos Costa jmcosta944 at gmail.com
Tue Nov 3 13:46:56 CET 2020


Reviewed-by Joao Marcos Costa <jmcosta944 at gmail.com>

Em ter., 3 de nov. de 2020 às 08:12, Richard Genoud <
richard.genoud at posteo.net> escreveu:

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

-- 
Atenciosamente,
João Marcos Costa

www.linkedin.com/in/jmarcoscosta/
https://github.com/jmarcoscosta


More information about the U-Boot mailing list