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: <1433843172-8953-1-git-send-email-gqjiang@suse.com>
Date:	Tue,  9 Jun 2015 17:46:12 +0800
From:	Guoqing Jiang <gqjiang@...e.com>
To:	ccaulfie@...hat.com, teigland@...hat.com
Cc:	cluster-devel@...hat.com, linux-kernel@...r.kernel.org,
	Guoqing Jiang <gqjiang@...e.com>
Subject: [PATCH] dlm: remove unnecessary error check

We don't need the redundant logic since send_message always returns 0.

Signed-off-by: Guoqing Jiang <gqjiang@...e.com>
---
 fs/dlm/lock.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 35502d4..6fc3de9 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -3656,10 +3656,7 @@ static int send_common(struct dlm_rsb *r, struct dlm_lkb *lkb, int mstype)
 
 	send_args(r, lkb, ms);
 
-	error = send_message(mh, ms);
-	if (error)
-		goto fail;
-	return 0;
+	return send_message(mh, ms);
 
  fail:
 	remove_from_waiters(lkb, msg_reply_type(mstype));
@@ -3763,10 +3760,7 @@ static int send_lookup(struct dlm_rsb *r, struct dlm_lkb *lkb)
 
 	send_args(r, lkb, ms);
 
-	error = send_message(mh, ms);
-	if (error)
-		goto fail;
-	return 0;
+	return send_message(mh, ms);
 
  fail:
 	remove_from_waiters(lkb, DLM_MSG_LOOKUP_REPLY);
-- 
1.7.12.4

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