summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2009-10-13 09:18:22 +0200
committerJens Axboe <jens.axboe@oracle.com>2009-10-13 09:18:22 +0200
commit2cfa948c9ea8681e831743a3bb61157f590fa8d8 (patch)
treeaf80ef81803befceda2052fd4738dbf3f80fef95 /drivers/block
parentc7ebf0657b1f47d85aee8349ed6345d940d7232a (diff)
downloadop-kernel-dev-2cfa948c9ea8681e831743a3bb61157f590fa8d8.zip
op-kernel-dev-2cfa948c9ea8681e831743a3bb61157f590fa8d8.tar.gz
cciss: Fix multiple calls to pci_release_regions
Fix multiple calls to pci_release_regions. If cciss_pci_init fails, it already does any necessary call to pci_release_regions, so this does not need to be done again in cciss_init_one in that case. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/cciss.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index fb5be2d..52f53c1 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -4254,7 +4254,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
mutex_init(&hba[i]->busy_shutting_down);
if (cciss_pci_init(hba[i], pdev) != 0)
- goto clean0;
+ goto clean_no_release_regions;
sprintf(hba[i]->devname, "cciss%d", i);
hba[i]->ctlr = i;
@@ -4391,13 +4391,14 @@ clean2:
clean1:
cciss_destroy_hba_sysfs_entry(hba[i]);
clean0:
+ pci_release_regions(pdev);
+clean_no_release_regions:
hba[i]->busy_initializing = 0;
/*
* Deliberately omit pci_disable_device(): it does something nasty to
* Smart Array controllers that pci_enable_device does not undo
*/
- pci_release_regions(pdev);
pci_set_drvdata(pdev, NULL);
free_hba(i);
return -1;
OpenPOWER on IntegriCloud