* [PATCH] cciss: Fix multiple calls to pci_release_regions
@ 2009-10-12 15:35 Stephen M. Cameron
2009-10-13 7:17 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Stephen M. Cameron @ 2009-10-12 15:35 UTC (permalink / raw)
To: akpm, axboe; +Cc: linux-kernel, mikem, scameron
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>
---
drivers/block/cciss.c | 5 +++--
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cciss: Fix multiple calls to pci_release_regions
2009-10-12 15:35 [PATCH] cciss: Fix multiple calls to pci_release_regions Stephen M. Cameron
@ 2009-10-13 7:17 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2009-10-13 7:17 UTC (permalink / raw)
To: Stephen M. Cameron; +Cc: akpm, linux-kernel, mikem
On Mon, Oct 12 2009, Stephen M. Cameron wrote:
> 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.
Thanks, applied
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-13 7:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-12 15:35 [PATCH] cciss: Fix multiple calls to pci_release_regions Stephen M. Cameron
2009-10-13 7:17 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox