Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1202923 > unrolled thread

[PATCH] zram: Remove useless check

Started bySalah Triki <salah.triki@acm.org>
First post2015-08-07 19:00 +0200
Last post2015-08-07 19:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] zram: Remove useless check Salah Triki <salah.triki@acm.org> - 2015-08-07 19:00 +0200

#1202923 — [PATCH] zram: Remove useless check

FromSalah Triki <salah.triki@acm.org>
Date2015-08-07 19:00 +0200
Subject[PATCH] zram: Remove useless check
Message-ID<pUT9W-5pP-41@gated-at.bofh.it>
lzo1x_1_compress always LZO_E_OK that is equal to 0.

Signed-off-by: Salah Triki <salah.triki@acm.org>
---
 drivers/block/zram/zcomp_lzo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/block/zram/zcomp_lzo.c b/drivers/block/zram/zcomp_lzo.c
index da1bc47..3cf30c9 100644
--- a/drivers/block/zram/zcomp_lzo.c
+++ b/drivers/block/zram/zcomp_lzo.c
@@ -26,8 +26,7 @@ static void lzo_destroy(void *private)
 static int lzo_compress(const unsigned char *src, unsigned char *dst,
 		size_t *dst_len, void *private)
 {
-	int ret = lzo1x_1_compress(src, PAGE_SIZE, dst, dst_len, private);
-	return ret == LZO_E_OK ? 0 : ret;
+	return lzo1x_1_compress(src, PAGE_SIZE, dst, dst_len, private);
 }
 
 static int lzo_decompress(const unsigned char *src, size_t src_len,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web