4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Russell King <[email protected]>

commit ec014cbacf6229c583cb832726ca39be1ae3d8c3 upstream.

Avoid multiple tests while handling a command error; simplify the code.

Signed-off-by: Russell King <[email protected]>
Signed-off-by: Adrian Hunter <[email protected]>
[ Goes with "mmc: sdhci: fix command response CRC error handling" ]
Tested-by: Gregory CLEMENT <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/mmc/host/sdhci.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2323,13 +2323,13 @@ static void sdhci_cmd_irq(struct sdhci_h
                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;
        }


Reply via email to