From patchwork Sat Jan 20 06:12:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 10176271 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 23B2760386 for ; Sat, 20 Jan 2018 06:12:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11157287C3 for ; Sat, 20 Jan 2018 06:12:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05992287F8; Sat, 20 Jan 2018 06:12:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65540287C3 for ; Sat, 20 Jan 2018 06:12:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751075AbeATGMv (ORCPT ); Sat, 20 Jan 2018 01:12:51 -0500 Received: from smtp07.smtpout.orange.fr ([80.12.242.129]:27537 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750937AbeATGMt (ORCPT ); Sat, 20 Jan 2018 01:12:49 -0500 Received: from localhost.localdomain ([90.107.118.99]) by mwinf5d30 with ME id 0WCm1x00B28lVBu03WCngt; Sat, 20 Jan 2018 07:12:48 +0100 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 20 Jan 2018 07:12:48 +0100 X-ME-IP: 90.107.118.99 From: Christophe JAILLET To: aradford@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] scsi: 3ware: use pci_iounmap instead of iounmap Date: Sat, 20 Jan 2018 07:12:22 +0100 Message-Id: <20180120061222.29166-1-christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.14.1 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP '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 --- 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);