mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ralf Thielow <ralf.thielow@googlemail.com>
To: gregkh@suse.de
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Ralf Thielow <ralf.thielow@googlemail.com>
Subject: [PATCH 4/4] staging: keucr: smscsi: Removed unreachable return statements.
Date: Sat, 26 Mar 2011 17:16:20 +0100	[thread overview]
Message-ID: <1301156180-12192-4-git-send-email-ralf.thielow@googlemail.com> (raw)
In-Reply-To: <1301156180-12192-1-git-send-email-ralf.thielow@googlemail.com>

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

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.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


      parent reply	other threads:[~2011-03-26 16:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26 16:16 [PATCH 1/4] staging: keucr: smscsi: Fixed most checkpatch warnings and errors Ralf Thielow
2011-03-26 16:16 ` [PATCH 2/4] staging: keucr: smscsi: Includes missing KERN_ facility level to printk() Ralf Thielow
2011-03-26 18:51   ` Joe Perches
2011-03-26 19:11     ` Ralf Thielow
2011-03-26 19:26       ` Joe Perches
2011-03-26 19:33         ` Ralf Thielow
2011-03-26 16:16 ` [PATCH 3/4] staging: keucr: smscsi: Removed commented declarations and statements Ralf Thielow
2011-03-26 16:16 ` Ralf Thielow [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1301156180-12192-4-git-send-email-ralf.thielow@googlemail.com \
    --to=ralf.thielow@googlemail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®