diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2016-01-26 13:39:39 +0000 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-02-29 11:03:14 +0100 |
commit | ec014cbacf6229c583cb832726ca39be1ae3d8c3 (patch) | |
tree | 59dbe576cb7699efa10f07a2ee69c8f98388accc /drivers/mmc/host/sdhci.c | |
parent | 96776200898cf9c1965b9f8b9a128e94bb6dce18 (diff) |
mmc: sdhci: clean up command error handling
Avoid multiple tests while handling a command error; simplify the code.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
[ Goes with "mmc: sdhci: fix command response CRC error handling" ]
Cc: stable@vger.kernel.org # v4.5+
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 43d87179c270..b261613224f6 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2323,13 +2323,13 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask, u32 *mask) return; } - if (intmask & SDHCI_INT_TIMEOUT) - host->cmd->error = -ETIMEDOUT; - else if (intmask & (SDHCI_INT_CRC | SDHCI_INT_END_BIT | - SDHCI_INT_INDEX)) - host->cmd->error = -EILSEQ; + if (intmask & (SDHCI_INT_TIMEOUT | SDHCI_INT_CRC | + SDHCI_INT_END_BIT | SDHCI_INT_INDEX)) { + if (intmask & SDHCI_INT_TIMEOUT) + host->cmd->error = -ETIMEDOUT; + else + host->cmd->error = -EILSEQ; - if (host->cmd->error) { tasklet_schedule(&host->finish_tasklet); return; } |