Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a0ff7a6 authored by Adrian Hunter's avatar Adrian Hunter Committed by Vinod Koul
Browse files

dmaengine: intel_mid_dma: error path fix



Add missing iounmap in error path.

Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
parent 1fded075
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -1104,7 +1104,8 @@ static int mid_setup_dma(struct pci_dev *pdev)
					LNW_PERIPHRAL_MASK_SIZE);
					LNW_PERIPHRAL_MASK_SIZE);
		if (dma->mask_reg == NULL) {
		if (dma->mask_reg == NULL) {
			pr_err("ERR_MDMA:Can't map periphral intr space !!\n");
			pr_err("ERR_MDMA:Can't map periphral intr space !!\n");
			return -ENOMEM;
			err = -ENOMEM;
			goto err_ioremap;
		}
		}
	} else
	} else
		dma->mask_reg = NULL;
		dma->mask_reg = NULL;
@@ -1201,6 +1202,9 @@ static int mid_setup_dma(struct pci_dev *pdev)
err_engine:
err_engine:
	free_irq(pdev->irq, dma);
	free_irq(pdev->irq, dma);
err_irq:
err_irq:
	if (dma->mask_reg)
		iounmap(dma->mask_reg);
err_ioremap:
	pci_pool_destroy(dma->dma_pool);
	pci_pool_destroy(dma->dma_pool);
err_dma_pool:
err_dma_pool:
	pr_err("ERR_MDMA:setup_dma failed: %d\n", err);
	pr_err("ERR_MDMA:setup_dma failed: %d\n", err);