Skip to contentSkip to conversation

zram: Remove useless check

PATCH Superseded Salah Triki 1 participant 1 message Aug 7, 2015

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 zram: Remove useless check

lzo1x_1_compress always returns LZO_E_OK that is equal to 0.

---
 drivers/block/zram/zcomp_lzo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/block/zram/zcomp_lzo.c +1 -2
index da1bc47..3cf30c9 100644
@@ -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,
Signature · 1 line
1.9.1