summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/fsmc_nand.c
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2015-03-13 14:54:45 +0300
committerBrian Norris <computersforpeace@gmail.com>2015-05-07 09:47:31 +0300
commit0bda3e194438dd6801b863e7a9c23ca80a7cff05 (patch)
tree570fd95b655df158a42764ace4ff4d266472babe /drivers/mtd/nand/fsmc_nand.c
parent0aec7ac997b784dfc83125cd120d2bd5d3851eb6 (diff)
downloadlinux-0bda3e194438dd6801b863e7a9c23ca80a7cff05.tar.xz
mtd: fsmc_nand: fix handling of wait_for_completion_timeout return value
wait_for_completion_timeout does not return negative values so result handling here does not need to check for negative return. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/fsmc_nand.c')
-rw-r--r--drivers/mtd/nand/fsmc_nand.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index e58af4bfa8c8..b6306b19a31a 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -604,11 +604,10 @@ static int dma_xfer(struct fsmc_nand_data *host, void *buffer, int len,
ret =
wait_for_completion_timeout(&host->dma_access_complete,
msecs_to_jiffies(3000));
- if (ret <= 0) {
+ if (ret == 0) {
dmaengine_terminate_all(chan);
dev_err(host->dev, "wait_for_completion_timeout\n");
- if (!ret)
- ret = -ETIMEDOUT;
+ ret = -ETIMEDOUT;
goto unmap_dma;
}