aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nand/gpmi-nand/gpmi-nand.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 33f3c3c54dbc..6e44d3268fcb 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -446,7 +446,7 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this,
446 struct dma_async_tx_descriptor *desc) 446 struct dma_async_tx_descriptor *desc)
447{ 447{
448 struct completion *dma_c = &this->dma_done; 448 struct completion *dma_c = &this->dma_done;
449 int err; 449 unsigned long timeout;
450 450
451 init_completion(dma_c); 451 init_completion(dma_c);
452 452
@@ -456,8 +456,8 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this,
456 dma_async_issue_pending(get_dma_chan(this)); 456 dma_async_issue_pending(get_dma_chan(this));
457 457
458 /* Wait for the interrupt from the DMA block. */ 458 /* Wait for the interrupt from the DMA block. */
459 err = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000)); 459 timeout = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000));
460 if (!err) { 460 if (!timeout) {
461 dev_err(this->dev, "DMA timeout, last DMA :%d\n", 461 dev_err(this->dev, "DMA timeout, last DMA :%d\n",
462 this->last_dma_type); 462 this->last_dma_type);
463 gpmi_dump_info(this); 463 gpmi_dump_info(this);
@@ -477,7 +477,7 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
477 struct dma_async_tx_descriptor *desc) 477 struct dma_async_tx_descriptor *desc)
478{ 478{
479 struct completion *bch_c = &this->bch_done; 479 struct completion *bch_c = &this->bch_done;
480 int err; 480 unsigned long timeout;
481 481
482 /* Prepare to receive an interrupt from the BCH block. */ 482 /* Prepare to receive an interrupt from the BCH block. */
483 init_completion(bch_c); 483 init_completion(bch_c);
@@ -486,8 +486,8 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
486 start_dma_without_bch_irq(this, desc); 486 start_dma_without_bch_irq(this, desc);
487 487
488 /* Wait for the interrupt from the BCH block. */ 488 /* Wait for the interrupt from the BCH block. */
489 err = wait_for_completion_timeout(bch_c, msecs_to_jiffies(1000)); 489 timeout = wait_for_completion_timeout(bch_c, msecs_to_jiffies(1000));
490 if (!err) { 490 if (!timeout) {
491 dev_err(this->dev, "BCH timeout, last DMA :%d\n", 491 dev_err(this->dev, "BCH timeout, last DMA :%d\n",
492 this->last_dma_type); 492 this->last_dma_type);
493 gpmi_dump_info(this); 493 gpmi_dump_info(this);