Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966291AbcLWKb1 (ORCPT ); Fri, 23 Dec 2016 05:31:27 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35337 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757339AbcLWKbZ (ORCPT ); Fri, 23 Dec 2016 05:31:25 -0500 From: Arvind Yadav 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 Message-Id: <1482489076-17799-1-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 658 Lines: 25 Unmap and release PCI BARs, if dw_mci_pci_probe is not successful. Signed-off-by: Arvind Yadav --- 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