summaryrefslogtreecommitdiff
path: root/drivers/staging/slicoss
diff options
context:
space:
mode:
authorKristina Martšenko <kristina.martsenko@gmail.com>2014-03-18 17:05:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-18 12:11:55 -0700
commiteea7c7036e73f661accf297e4b1630f0a48e611e (patch)
tree8aaabd9969a8014bb56181894ecfc7afc73d416b /drivers/staging/slicoss
parentba2ac29ed6afa4e4a6a42170e7a7aa64199321be (diff)
staging: slicoss: free IO remapping on failure
Make sure iounmap is always called after ioremap when module loading fails. Also remove a call to release_mem_region because that region is never reserved in the first place. Fixes the following issue reported by Coccinelle: drivers/staging/slicoss/slicoss.c:3727:1-7: ERROR: missing iounmap; ioremap on line 3661 and execution via conditional on line 3677 Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/slicoss')
-rw-r--r--drivers/staging/slicoss/slicoss.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 55e4d827af2d..e27b88f02ccd 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -3676,7 +3676,7 @@ static int slic_entry_probe(struct pci_dev *pcidev,
err = slic_card_locate(adapter);
if (err) {
dev_err(&pcidev->dev, "cannot locate card\n");
- goto err_out_free_mmio_region;
+ goto err_out_unmap;
}
card = adapter->card;
@@ -3716,8 +3716,6 @@ static int slic_entry_probe(struct pci_dev *pcidev,
err_out_unmap:
iounmap(memmapped_ioaddr);
-err_out_free_mmio_region:
- release_mem_region(mmio_start, mmio_len);
err_out_free_netdev:
free_netdev(netdev);
err_out_exit_slic_probe: