aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2009-10-13 03:18:22 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-10-13 03:18:22 -0400
commit2cfa948c9ea8681e831743a3bb61157f590fa8d8 (patch)
treeaf80ef81803befceda2052fd4738dbf3f80fef95 /drivers/block
parentc7ebf0657b1f47d85aee8349ed6345d940d7232a (diff)
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 fb5be2d95d52..52f53c134c5b 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,
4254 mutex_init(&hba[i]->busy_shutting_down); 4254 mutex_init(&hba[i]->busy_shutting_down);
4255 4255
4256 if (cciss_pci_init(hba[i], pdev) != 0) 4256 if (cciss_pci_init(hba[i], pdev) != 0)
4257 goto clean0; 4257 goto clean_no_release_regions;
4258 4258
4259 sprintf(hba[i]->devname, "cciss%d", i); 4259 sprintf(hba[i]->devname, "cciss%d", i);
4260 hba[i]->ctlr = i; 4260 hba[i]->ctlr = i;
@@ -4391,13 +4391,14 @@ clean2:
4391clean1: 4391clean1:
4392 cciss_destroy_hba_sysfs_entry(hba[i]); 4392 cciss_destroy_hba_sysfs_entry(hba[i]);
4393clean0: 4393clean0:
4394 pci_release_regions(pdev);
4395clean_no_release_regions:
4394 hba[i]->busy_initializing = 0; 4396 hba[i]->busy_initializing = 0;
4395 4397
4396 /* 4398 /*
4397 * Deliberately omit pci_disable_device(): it does something nasty to 4399 * Deliberately omit pci_disable_device(): it does something nasty to
4398 * Smart Array controllers that pci_enable_device does not undo 4400 * Smart Array controllers that pci_enable_device does not undo
4399 */ 4401 */
4400 pci_release_regions(pdev);
4401 pci_set_drvdata(pdev, NULL); 4402 pci_set_drvdata(pdev, NULL);
4402 free_hba(i); 4403 free_hba(i);
4403 return -1; 4404 return -1;