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>] [day] [month] [year] [list]
Message-ID: <20200915032632.1772725-1-liushixin2@huawei.com>
Date:   Tue, 15 Sep 2020 11:26:32 +0800
From:   Liu Shixin <liushixin2@...wei.com>
To:     Evgeniy Polyakov <zbr@...emap.net>
CC:     <linux-kernel@...r.kernel.org>, Liu Shixin <liushixin2@...wei.com>
Subject: [PATCH -next] w1: ds2490: simplify the return expression of ds_reset()

Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@...wei.com>
---
 drivers/w1/masters/ds2490.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c
index e17c8f70dcd0..d42da8bde06c 100644
--- a/drivers/w1/masters/ds2490.c
+++ b/drivers/w1/masters/ds2490.c
@@ -464,8 +464,6 @@ static int ds_wait_status(struct ds_device *dev, struct ds_status *st)
 
 static int ds_reset(struct ds_device *dev)
 {
-	int err;
-
 	/* Other potentionally interesting flags for reset.
 	 *
 	 * COMM_NTF: Return result register feedback.  This could be used to
@@ -475,11 +473,7 @@ static int ds_reset(struct ds_device *dev)
 	 * COMM_SE which allows SPEED_NORMAL, SPEED_FLEXIBLE, SPEED_OVERDRIVE:
 	 * Select the data transfer rate.
 	 */
-	err = ds_send_control(dev, COMM_1_WIRE_RESET | COMM_IM, SPEED_NORMAL);
-	if (err)
-		return err;
-
-	return 0;
+	return ds_send_control(dev, COMM_1_WIRE_RESET | COMM_IM, SPEED_NORMAL);
 }
 
 #if 0
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ