diff options
author | Per Forlin <per.forlin@linaro.org> | 2011-08-29 15:35:59 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2011-12-06 10:57:47 +0100 |
commit | 94368056d4b34a0ff761ec4968864c670e6afb7c (patch) | |
tree | b9e7988d8aa1770227a703579c2417912059a2f5 /drivers/mmc/host | |
parent | e9e053fe49d95652259ca755c5106782330a37fa (diff) |
mmc: mmci: simplify err check in mmci_post_request
The error condition indicates that mmci_post_request() should cleanup
after the mmci_pre_request(). In this case the resources allocated by
device_prep_slave_sg() are freed by calling dmaengine_terminate_all().
dma_unmap_sg() should always be performed if the host_cookie is set.
Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Change-Id: I04172ae0d6fc7089d126f7f2d7687c69fa5646f7
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31975
Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
Tested-by: Ulf HANSSON <ulf.hansson@stericsson.com>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/mmci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index baa7883c49e..13222bd32a1 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -544,7 +544,7 @@ static void mmci_post_request(struct mmc_host *mmc, struct mmc_request *mrq, if (chan) { if (err) dmaengine_terminate_all(chan); - if (err || data->host_cookie) + if (data->host_cookie) dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, dir); mrq->data->host_cookie = 0; |