summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2024-10-29 22:20:15 +0000
committerRichard Weinberger <richard@nod.at>2024-11-14 20:27:39 +0100
commit7c8e694bdb7ba75d13854b59f3af6d66f0ea6df2 (patch)
tree3911f757e2e29042bdc77a9a6b9e95879b540441
parentef027aca2961b5b60ec9e91e3758af751396ad3d (diff)
downloadlinux-7c8e694bdb7ba75d13854b59f3af6d66f0ea6df2.tar.gz
linux-7c8e694bdb7ba75d13854b59f3af6d66f0ea6df2.tar.bz2
linux-7c8e694bdb7ba75d13854b59f3af6d66f0ea6df2.zip
jffs2: remove redundant check on outpos > pos
The check for outpos > pos is always false because outpos is zero and pos is at least zero; outpos can never be greater than pos. The check is redundant and can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r--fs/jffs2/compr_rubin.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c
index 556de100ebd5..9854253d0108 100644
--- a/fs/jffs2/compr_rubin.c
+++ b/fs/jffs2/compr_rubin.c
@@ -276,11 +276,6 @@ static int rubin_do_compress(int bit_divider, int *bits, unsigned char *data_in,
end_rubin(&rs);
- if (outpos > pos) {
- /* We failed */
- return -1;
- }
-
/* Tell the caller how much we managed to compress,
* and how much space it took */