Skip to content

Commit ebf7547

Browse files
Philipp Stannerbjorn-helgaas
authored andcommitted
mtip32xx: Remove unnecessary pcim_iounmap_regions() calls
pcim_iounmap_regions() is deprecated. Moreover, it is not necessary to call it in the driver's remove() function or if probe() fails, since it does cleanup automatically on driver detach. Remove all calls to pcim_iounmap_regions(). Signed-off-by: Philipp Stanner <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Jens Axboe <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 0af2f6b commit ebf7547

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/block/mtip32xx/mtip32xx.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3717,7 +3717,7 @@ static int mtip_pci_probe(struct pci_dev *pdev,
37173717
rv = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
37183718
if (rv) {
37193719
dev_warn(&pdev->dev, "64-bit DMA enable failed\n");
3720-
goto setmask_err;
3720+
goto iomap_err;
37213721
}
37223722

37233723
/* Copy the info we may need later into the private data structure. */
@@ -3733,7 +3733,7 @@ static int mtip_pci_probe(struct pci_dev *pdev,
37333733
if (!dd->isr_workq) {
37343734
dev_warn(&pdev->dev, "Can't create wq %d\n", dd->instance);
37353735
rv = -ENOMEM;
3736-
goto setmask_err;
3736+
goto iomap_err;
37373737
}
37383738

37393739
memset(cpu_list, 0, sizeof(cpu_list));
@@ -3830,8 +3830,6 @@ static int mtip_pci_probe(struct pci_dev *pdev,
38303830
drop_cpu(dd->work[1].cpu_binding);
38313831
drop_cpu(dd->work[2].cpu_binding);
38323832
}
3833-
setmask_err:
3834-
pcim_iounmap_regions(pdev, 1 << MTIP_ABAR);
38353833

38363834
iomap_err:
38373835
kfree(dd);
@@ -3907,7 +3905,6 @@ static void mtip_pci_remove(struct pci_dev *pdev)
39073905

39083906
pci_disable_msi(pdev);
39093907

3910-
pcim_iounmap_regions(pdev, 1 << MTIP_ABAR);
39113908
pci_set_drvdata(pdev, NULL);
39123909

39133910
put_disk(dd->disk);

0 commit comments

Comments
 (0)