Commit 2e63a4a4 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman

staging: rts5208: remove redundant sd30_mode checks

There are two hunks of code that check if sd30_mode is true however
an earlier check in an outer code block on sd30_mode being false means
that sd30_mode can never be true at these points so these checks are
redundant.  Remove the dead code.

Addresses-Coverity: ("Logically dead code")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190830081047.13630-1-colin.king@canonical.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent be22bc7c
......@@ -2573,9 +2573,6 @@ static int reset_sd(struct rtsx_chip *chip)
retval = sd_sdr_tuning(chip);
if (retval != STATUS_SUCCESS) {
if (sd20_mode) {
goto status_fail;
} else {
retval = sd_init_power(chip);
if (retval != STATUS_SUCCESS)
goto status_fail;
......@@ -2584,7 +2581,6 @@ static int reset_sd(struct rtsx_chip *chip)
sd20_mode = true;
goto switch_fail;
}
}
sd_send_cmd_get_rsp(chip, SEND_STATUS, sd_card->sd_addr,
SD_RSP_TYPE_R1, NULL, 0);
......@@ -2598,9 +2594,6 @@ static int reset_sd(struct rtsx_chip *chip)
if (read_lba0) {
retval = sd_read_lba0(chip);
if (retval != STATUS_SUCCESS) {
if (sd20_mode) {
goto status_fail;
} else {
retval = sd_init_power(chip);
if (retval != STATUS_SUCCESS)
goto status_fail;
......@@ -2611,7 +2604,6 @@ static int reset_sd(struct rtsx_chip *chip)
}
}
}
}
retval = sd_check_wp_state(chip);
if (retval != STATUS_SUCCESS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment