|
@@ -604,11 +604,10 @@ static int dma_xfer(struct fsmc_nand_data *host, void *buffer, int len,
|
|
ret =
|
|
ret =
|
|
wait_for_completion_timeout(&host->dma_access_complete,
|
|
wait_for_completion_timeout(&host->dma_access_complete,
|
|
msecs_to_jiffies(3000));
|
|
msecs_to_jiffies(3000));
|
|
- if (ret <= 0) {
|
|
|
|
|
|
+ if (ret == 0) {
|
|
dmaengine_terminate_all(chan);
|
|
dmaengine_terminate_all(chan);
|
|
dev_err(host->dev, "wait_for_completion_timeout\n");
|
|
dev_err(host->dev, "wait_for_completion_timeout\n");
|
|
- if (!ret)
|
|
|
|
- ret = -ETIMEDOUT;
|
|
|
|
|
|
+ ret = -ETIMEDOUT;
|
|
goto unmap_dma;
|
|
goto unmap_dma;
|
|
}
|
|
}
|
|
|
|
|