[PATCH] staging: rts5208: remove unnecessary if
Roxana Blaj
roxanagabriela10 at gmail.com
Mon Sep 22 19:10:16 EEST 2014
This fixes the warning:
WARNING: Too many leading tabs - consider code refactoring
Additionally I fixed the warning:
WARNING: line over 80 characters
Signed-off-by: Roxana Blaj <roxanagabriela10 at gmail.com>
---
drivers/staging/rts5208/sd.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
index 21c3b3c..2a847d5 100644
--- a/drivers/staging/rts5208/sd.c
+++ b/drivers/staging/rts5208/sd.c
@@ -4325,20 +4325,23 @@ int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip)
sd_lock_state, sd_card->sd_lock_status);
if (sd_lock_state ^ (sd_card->sd_lock_status & SD_LOCKED)) {
sd_card->sd_lock_notify = 1;
- if (sd_lock_state) {
- if (sd_card->sd_lock_status & SD_LOCK_1BIT_MODE) {
- sd_card->sd_lock_status |= (
- SD_UNLOCK_POW_ON | SD_SDR_RST);
- if (CHK_SD(sd_card)) {
- retval = reset_sd(chip);
- if (retval != STATUS_SUCCESS) {
- sd_card->sd_lock_status &= ~(SD_UNLOCK_POW_ON | SD_SDR_RST);
- TRACE_GOTO(chip, SD_Execute_Write_Cmd_Failed);
- }
+ if (sd_lock_state && (
+ sd_card->sd_lock_status & SD_LOCK_1BIT_MODE)) {
+ sd_card->sd_lock_status |= (
+ SD_UNLOCK_POW_ON | SD_SDR_RST);
+ if (CHK_SD(sd_card)) {
+ retval = reset_sd(chip);
+ if (retval != STATUS_SUCCESS) {
+ sd_card->sd_lock_status &= ~(
+ SD_UNLOCK_POW_ON |
+ SD_SDR_RST);
+ TRACE_GOTO(chip,
+ SD_Execute_Write_Cmd_Failed);
}
-
- sd_card->sd_lock_status &= ~(SD_UNLOCK_POW_ON | SD_SDR_RST);
}
+
+ sd_card->sd_lock_status &= ~(
+ SD_UNLOCK_POW_ON | SD_SDR_RST);
}
}
}
--
1.9.1
More information about the firefly
mailing list