Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757833AbcDJSwj (ORCPT ); Sun, 10 Apr 2016 14:52:39 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52579 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932079AbcDJSst (ORCPT ); Sun, 10 Apr 2016 14:48:49 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Russell King , Adrian Hunter , Gregory CLEMENT , Ulf Hansson Subject: [PATCH 4.5 192/238] mmc: sdhci: clean up command error handling Date: Sun, 10 Apr 2016 11:36:09 -0700 Message-Id: <20160410183506.903402089@linuxfoundation.org> X-Mailer: git-send-email 2.8.0 In-Reply-To: <20160410183456.398741366@linuxfoundation.org> References: <20160410183456.398741366@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1366 Lines: 44 4.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Russell King commit ec014cbacf6229c583cb832726ca39be1ae3d8c3 upstream. Avoid multiple tests while handling a command error; simplify the code. Signed-off-by: Russell King Signed-off-by: Adrian Hunter [ Goes with "mmc: sdhci: fix command response CRC error handling" ] Tested-by: Gregory CLEMENT Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- 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; }