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: <20150701155521.GA3613@ubuntu>
Date:	Wed, 1 Jul 2015 08:55:21 -0700
From:	Leung Timothy Chi King <contact@...othyleung.co>
To:	<gregkh@...uxfoundation.org>, <fabio.falzoi84@...il.com>,
	<joe@...ches.com>, <lambert.quentin@...il.com>,
	<tinajohnson.1234@...il.com>
CC:	<contact@...othyleung.co>, <devel@...verdev.osuosl.org>,
	<linux-kernel@...r.kernel.org>
Subject: [PATCH] Code cleanup - else is not generally useful after a break or
 return

Ran checkpatch.pl on driver/staging/rts5208/sd.c and foudn a WARNING
'else is not generally useful after a break or return' on line 3523. I
removed the else without affecting the logic and the WARNING is gone. I
had compiled and modprobe rts5208 to double check as well.

Regards,
Tim

Signed-off-by: Leung Timothy Chi King <contact@...othyleung.co>
---
 drivers/staging/rts5208/sd.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
index a8d657b..cb41579 100644
--- a/drivers/staging/rts5208/sd.c
+++ b/drivers/staging/rts5208/sd.c
@@ -3520,12 +3520,11 @@ int reset_sd_card(struct rtsx_chip *chip)
 			if (chip->sd_io) {
 				rtsx_trace(chip);
 				return STATUS_FAIL;
-			} else {
-				retval = reset_mmc(chip);
-				if (retval != STATUS_SUCCESS) {
-					rtsx_trace(chip);
-					return STATUS_FAIL;
-				}
+			}
+			retval = reset_mmc(chip);
+			if (retval != STATUS_SUCCESS) {
+				rtsx_trace(chip);
+				return STATUS_FAIL;
 			}
 		}
 	}
-- 
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