From 0bda3e194438dd6801b863e7a9c23ca80a7cff05 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Fri, 13 Mar 2015 07:54:45 -0400 Subject: 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 Signed-off-by: Brian Norris diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index e58af4b..b6306b1 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; } -- cgit v0.10.2