From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: jh80.chung@samsung.com, ulf.hansson@linaro.org
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [v1] mmc: host: dw_mmc-pci:- Unmap region obtained by pcim_iomap_regions
Date: Fri, 23 Dec 2016 16:01:16 +0530 [thread overview]
Message-ID: <1482489076-17799-1-git-send-email-arvind.yadav.cs@gmail.com> (raw)
Unmap and release PCI BARs, if dw_mci_pci_probe is not successful.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/mmc/host/dw_mmc-pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c
index ab82796..f10bad8 100644
--- a/drivers/mmc/host/dw_mmc-pci.c
+++ b/drivers/mmc/host/dw_mmc-pci.c
@@ -65,8 +65,10 @@ static int dw_mci_pci_probe(struct pci_dev *pdev,
pci_set_master(pdev);
ret = dw_mci_probe(host);
- if (ret)
+ if (ret) {
+ pcim_iounmap_regions(pdev, 1 << PCI_BAR_NO);
return ret;
+ }
pci_set_drvdata(pdev, host);
--
1.7.9.5
reply other threads:[~2016-12-23 10:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1482489076-17799-1-git-send-email-arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).