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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 26 Mar 2011 17:16:20 +0100
From:	Ralf Thielow <ralf.thielow@...glemail.com>
To:	gregkh@...e.de
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Ralf Thielow <ralf.thielow@...glemail.com>
Subject: [PATCH 4/4] staging: keucr: smscsi: Removed unreachable return statements.

Removed unreachable return statements and simplify the logic by
avoid else-cases where it's not necessary.

Signed-off-by: Ralf Thielow <ralf.thielow@...glemail.com>
---
 drivers/staging/keucr/smscsi.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/keucr/smscsi.c b/drivers/staging/keucr/smscsi.c
index f857be7..38d4ab3 100644
--- a/drivers/staging/keucr/smscsi.c
+++ b/drivers/staging/keucr/smscsi.c
@@ -54,8 +54,6 @@ int SM_SCSI_Test_Unit_Ready(struct us_data *us, struct scsi_cmnd *srb)
 		ENE_SMInit(us);
 		return USB_STOR_TRANSPORT_GOOD;
 	}
-
-	return USB_STOR_TRANSPORT_GOOD;
 }
 
 int SM_SCSI_Inquiry(struct us_data *us, struct scsi_cmnd *srb)
@@ -141,10 +139,8 @@ int SM_SCSI_Read(struct us_data *us, struct scsi_cmnd *srb)
 
 	if (!result)
 		return USB_STOR_TRANSPORT_GOOD;
-	else
-		return USB_STOR_TRANSPORT_ERROR;
 
-	return USB_STOR_TRANSPORT_GOOD;
+	return USB_STOR_TRANSPORT_ERROR;
 }
 
 int SM_SCSI_Write(struct us_data *us, struct scsi_cmnd *srb)
@@ -170,9 +166,7 @@ int SM_SCSI_Write(struct us_data *us, struct scsi_cmnd *srb)
 
 	if (!result)
 		return USB_STOR_TRANSPORT_GOOD;
-	else
-		return USB_STOR_TRANSPORT_ERROR;
 
-	return USB_STOR_TRANSPORT_GOOD;
+	return USB_STOR_TRANSPORT_ERROR;
 }
 
-- 
1.7.4.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