From: Adrian Hunter <adrian.hunter@intel.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
LKML <linux-kernel@vger.kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>
Subject: [PATCH 2/3] dmaengine: intel_mid_dma: error path fix
Date: Fri, 16 Dec 2011 11:01:39 +0200 [thread overview]
Message-ID: <1324026100-3124-3-git-send-email-adrian.hunter@intel.com> (raw)
In-Reply-To: <1324026100-3124-1-git-send-email-adrian.hunter@intel.com>
Add missing iounmap in error path.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/dma/intel_mid_dma.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
index d4b9616..bbcd470 100644
--- a/drivers/dma/intel_mid_dma.c
+++ b/drivers/dma/intel_mid_dma.c
@@ -1104,7 +1104,8 @@ static int mid_setup_dma(struct pci_dev *pdev)
LNW_PERIPHRAL_MASK_SIZE);
if (dma->mask_reg == NULL) {
pr_err("ERR_MDMA:Can't map periphral intr space !!\n");
- return -ENOMEM;
+ err = -ENOMEM;
+ goto err_ioremap;
}
} else
dma->mask_reg = NULL;
@@ -1201,6 +1202,9 @@ static int mid_setup_dma(struct pci_dev *pdev)
err_engine:
free_irq(pdev->irq, dma);
err_irq:
+ if (dma->mask_reg)
+ iounmap(dma->mask_reg);
+err_ioremap:
pci_pool_destroy(dma->dma_pool);
err_dma_pool:
pr_err("ERR_MDMA:setup_dma failed: %d\n", err);
--
1.7.6.4
next prev parent reply other threads:[~2011-12-16 9:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-16 9:01 [PATCH 0/3] dmaengine: intel_mid_dma: fixes Adrian Hunter
2011-12-16 9:01 ` [PATCH 1/3] dmaengine: intel_mid_dma: locking and freeing fixes Adrian Hunter
2011-12-16 9:01 ` Adrian Hunter [this message]
2011-12-16 9:01 ` [PATCH 3/3] dmaengine: intel_mid_dma: remove legacy pm interface Adrian Hunter
2011-12-20 9:13 ` Vinod Koul
2011-12-20 9:29 ` Adrian Hunter
2011-12-20 10:56 ` Alan Cox
2011-12-23 16:34 ` [PATCH 0/3] dmaengine: intel_mid_dma: fixes Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324026100-3124-3-git-send-email-adrian.hunter@intel.com \
--to=adrian.hunter@intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.