diff options
-rw-r--r-- | drivers/mtd/nand/sh_flctl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c index 6fa3bcd59769..442ce619b3b6 100644 --- a/drivers/mtd/nand/sh_flctl.c +++ b/drivers/mtd/nand/sh_flctl.c | |||
@@ -397,7 +397,7 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf, | |||
397 | struct dma_chan *chan; | 397 | struct dma_chan *chan; |
398 | enum dma_transfer_direction tr_dir; | 398 | enum dma_transfer_direction tr_dir; |
399 | dma_addr_t dma_addr; | 399 | dma_addr_t dma_addr; |
400 | dma_cookie_t cookie = -EINVAL; | 400 | dma_cookie_t cookie; |
401 | uint32_t reg; | 401 | uint32_t reg; |
402 | int ret; | 402 | int ret; |
403 | 403 | ||
@@ -423,6 +423,12 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf, | |||
423 | desc->callback = flctl_dma_complete; | 423 | desc->callback = flctl_dma_complete; |
424 | desc->callback_param = flctl; | 424 | desc->callback_param = flctl; |
425 | cookie = dmaengine_submit(desc); | 425 | cookie = dmaengine_submit(desc); |
426 | if (dma_submit_error(cookie)) { | ||
427 | ret = dma_submit_error(cookie); | ||
428 | dev_warn(&flctl->pdev->dev, | ||
429 | "DMA submit failed, falling back to PIO\n"); | ||
430 | goto out; | ||
431 | } | ||
426 | 432 | ||
427 | dma_async_issue_pending(chan); | 433 | dma_async_issue_pending(chan); |
428 | } else { | 434 | } else { |