diff options
author | Marek Vasut <marex@denx.de> | 2015-07-27 22:39:36 +0200 |
---|---|---|
committer | Pantelis Antoniou <pantelis.antoniou@konsulko.com> | 2015-08-11 20:43:34 +0300 |
commit | 603b2f3a74412110b5bc515a0d75929f8651dc6c (patch) | |
tree | 17ed63a3d50534c89153340c91d338fb610a8569 /drivers/mmc | |
parent | e2c1c5bae619d2e87505de99f907a26237640bc9 (diff) |
mmc: dw_mmc: Stop bounce buffer even in case of failure
The driver didn't stop the bounce buffer in case a data transfer
failed. This would lead to memory leakage if the communication
between the CPU and the card is unreliable. Add the missing call
to stop the bounce buffer.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/dw_mmc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 53a8aca84b..3fffa71166 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -215,6 +215,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, mask = dwmci_readl(host, DWMCI_RINTSTS); if (mask & (DWMCI_DATA_ERR | DWMCI_DATA_TOUT)) { printf("%s: DATA ERROR!\n", __func__); + bounce_buffer_stop(&bbstate); return -1; } } while (!(mask & DWMCI_INTMSK_DTO)); |