lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1438968816-5370-1-git-send-email-salah.triki@acm.org>
Date:	Fri,  7 Aug 2015 18:33:36 +0100
From:	Salah Triki <salah.triki@....org>
To:	broonie@...nel.org, gregkh@...uxfoundation.org
Cc:	salah.triki@....org, linux-kernel@...r.kernel.org
Subject: [PATCH] regmap: Remove useless check

lzo1x_1_do_compress always returns LZO_E_OK. Thus, the check of the
return value is useless.

Signed-off-by: Salah Triki <salah.triki@....org>
---
 drivers/base/regmap/regcache-lzo.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/base/regmap/regcache-lzo.c b/drivers/base/regmap/regcache-lzo.c
index 2d53f6f..67245d0 100644
--- a/drivers/base/regmap/regcache-lzo.c
+++ b/drivers/base/regmap/regcache-lzo.c
@@ -46,11 +46,10 @@ static int regcache_lzo_prepare(struct regcache_lzo_ctx *lzo_ctx)
 static int regcache_lzo_compress(struct regcache_lzo_ctx *lzo_ctx)
 {
 	size_t compress_size;
-	int ret;
 
-	ret = lzo1x_1_compress(lzo_ctx->src, lzo_ctx->src_len,
+	lzo1x_1_compress(lzo_ctx->src, lzo_ctx->src_len,
 			       lzo_ctx->dst, &compress_size, lzo_ctx->wmem);
-	if (ret != LZO_E_OK || compress_size > lzo_ctx->dst_len)
+	if (compress_size > lzo_ctx->dst_len)
 		return -EINVAL;
 	lzo_ctx->dst_len = compress_size;
 	return 0;
-- 
1.9.1

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ