lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 23 Dec 2016 16:01:16 +0530
From:   Arvind Yadav <arvind.yadav.cs@...il.com>
To:     jh80.chung@...sung.com, ulf.hansson@...aro.org
Cc:     linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [v1] mmc: host: dw_mmc-pci:- Unmap region obtained by pcim_iomap_regions

Unmap and release PCI BARs, if dw_mci_pci_probe is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.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

Powered by blists - more mailing lists