Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1194685 > unrolled thread

[PATCH 11/11] staging: rtl8192e: probe: iounmap mmio when probe fails

Started byMateusz Kulikowski <mateusz.kulikowski@gmail.com>
First post2015-07-28 23:40 +0200
Last post2015-07-28 23:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 11/11] staging: rtl8192e: probe: iounmap mmio when probe fails Mateusz Kulikowski <mateusz.kulikowski@gmail.com> - 2015-07-28 23:40 +0200

#1194685 — [PATCH 11/11] staging: rtl8192e: probe: iounmap mmio when probe fails

FromMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Date2015-07-28 23:40 +0200
Subject[PATCH 11/11] staging: rtl8192e: probe: iounmap mmio when probe fails
Message-ID<pRkLo-4Fc-11@gated-at.bofh.it>
In case of probe failure, io memory was not released properly.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 0033cfb..c868cb37 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -2642,12 +2642,12 @@ static int rtl8192_pci_probe(struct pci_dev *pdev,
 	pci_read_config_byte(pdev, 0x08, &revision_id);
 	/* If the revisionid is 0x10, the device uses rtl8192se. */
 	if (pdev->device == 0x8192 && revision_id == 0x10)
-		goto err_rel_mem;
+		goto err_unmap;
 
 	priv->ops = ops;
 
 	if (rtl92e_check_adapter(pdev, dev) == false)
-		goto err_rel_mem;
+		goto err_unmap;
 
 	dev->irq = pdev->irq;
 	priv->irq = 0;
@@ -2688,6 +2688,8 @@ static int rtl8192_pci_probe(struct pci_dev *pdev,
 err_free_irq:
 	free_irq(dev->irq, dev);
 	priv->irq = 0;
+err_unmap:
+	iounmap((void __iomem *)ioaddr);
 err_rel_mem:
 	release_mem_region(pmem_start, pmem_len);
 err_rel_rtllib:
-- 
1.8.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web