summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2015-03-13 07:54:45 -0400
committerBrian Norris <computersforpeace@gmail.com>2015-05-06 23:47:31 -0700
commit0bda3e194438dd6801b863e7a9c23ca80a7cff05 (patch)
tree570fd95b655df158a42764ace4ff4d266472babe /drivers/mtd
parent0aec7ac997b784dfc83125cd120d2bd5d3851eb6 (diff)
downloadblackbird-op-linux-0bda3e194438dd6801b863e7a9c23ca80a7cff05.tar.gz
blackbird-op-linux-0bda3e194438dd6801b863e7a9c23ca80a7cff05.zip
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')
-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;
}
OpenPOWER on IntegriCloud