[PATCH 4/4] staging: keucr: smscsi: Removed unreachable return statements.

From: Ralf Thielow
Date: Sat Mar 26 2011 - 12:16:48 EST


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

Signed-off-by: Ralf Thielow <ralf.thielow@xxxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/