linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: 3ware: use pci_iounmap instead of iounmap
@ 2018-01-20  6:12 Christophe JAILLET
  0 siblings, 0 replies; only message in thread
From: Christophe JAILLET @ 2018-01-20  6:12 UTC (permalink / raw)
  To: aradford, jejb, martin.petersen
  Cc: linux-scsi, linux-kernel, kernel-janitors, Christophe JAILLET

'base_addr' has been mapped using 'pci_iomap()'. It should be freed with
the corresponding 'pci_iounmap()' instead of 'iomap()'.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/scsi/3w-sas.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c
index cf9f2a09b47d..231b04dd9076 100644
--- a/drivers/scsi/3w-sas.c
+++ b/drivers/scsi/3w-sas.c
@@ -1692,7 +1692,7 @@ static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
 		pci_disable_msi(pdev);
 	scsi_remove_host(host);
 out_iounmap:
-	iounmap(tw_dev->base_addr);
+	pci_iounmap(pdev, tw_dev->base_addr);
 out_release_mem_region:
 	pci_release_regions(pdev);
 out_free_device_extension:
@@ -1738,7 +1738,7 @@ static void twl_remove(struct pci_dev *pdev)
 		pci_disable_msi(pdev);
 
 	/* Free IO remapping */
-	iounmap(tw_dev->base_addr);
+	pci_iounmap(pdev, tw_dev->base_addr);
 
 	/* Free up the mem region */
 	pci_release_regions(pdev);
-- 
2.14.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-20  6:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-20  6:12 [PATCH] scsi: 3ware: use pci_iounmap instead of iounmap Christophe JAILLET

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).