* [v1] mmc: host: dw_mmc-pci:- Unmap region obtained by pcim_iomap_regions
@ 2016-12-23 10:31 Arvind Yadav
0 siblings, 0 replies; only message in thread
From: Arvind Yadav @ 2016-12-23 10:31 UTC (permalink / raw)
To: jh80.chung, ulf.hansson; +Cc: linux-mmc, linux-kernel
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-23 10:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-23 10:31 [v1] mmc: host: dw_mmc-pci:- Unmap region obtained by pcim_iomap_regions Arvind Yadav
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).