diff mbox

[v2,3/3] mmc: omap_hsmmc: update error code for response_busy cmd

Message ID 1352477176-6673-4-git-send-email-balajitk@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Balaji T K Nov. 9, 2012, 4:06 p.m. UTC
update error code to cmd->error for commands with response_busy and no data

Signed-off-by: Balaji T K <balajitk@ti.com>
---
 drivers/mmc/host/omap_hsmmc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Felipe Balbi Nov. 9, 2012, 4:40 p.m. UTC | #1
Hi,

On Fri, Nov 09, 2012 at 09:36:16PM +0530, Balaji T K wrote:
> update error code to cmd->error for commands with response_busy and no data
> 
> Signed-off-by: Balaji T K <balajitk@ti.com>

Just one comment below, otherwise:

Reviewed-by: Felipe Balbi <balbi@ti.com>

> ---
>  drivers/mmc/host/omap_hsmmc.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index d931e08..1503808 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -980,8 +980,8 @@ static void hsmmc_command_incomplete(struct omap_hsmmc_host *host,
>  	if (host->data) {
>  		omap_hsmmc_reset_controller_fsm(host, SRD);
>  		omap_hsmmc_dma_cleanup(host, err);
> -	}
> -
> +	} else if (host->mrq && host->mrq->cmd)
> +		host->mrq->cmd->error = err;

if you have curly braces in one branch, you need to put in all of them,
so this should be:

+	} else if (host->mrq && host->mrq->cmd) {
+		host->mrq->cmd->error = err;
+	}
diff mbox

Patch

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index d931e08..1503808 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -980,8 +980,8 @@  static void hsmmc_command_incomplete(struct omap_hsmmc_host *host,
 	if (host->data) {
 		omap_hsmmc_reset_controller_fsm(host, SRD);
 		omap_hsmmc_dma_cleanup(host, err);
-	}
-
+	} else if (host->mrq && host->mrq->cmd)
+		host->mrq->cmd->error = err;
 }
 
 static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status)