diff options
author | Hannes Reinecke <hare@suse.de> | 2009-03-25 06:19:37 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-03 10:22:55 -0400 |
commit | a2f5bfcf711aa72ad5587b533a1909334c2533a4 (patch) | |
tree | baf8be9fb21f8890087981bcd6fb173c1c65d238 /drivers/scsi/aic7xxx/aic79xx_pci.c | |
parent | c59c61493febac295e71a2c017fc0075620dbc6f (diff) |
[SCSI] aic7xxx: leaves timer running on init failure
aic79xx leaves timers inserted when ahd_init() (which inserts
two timers at its very end) succeeds but ahd_pci_map_int()
fails. In this case ahd->init_level gets incremented to 5 only
when that function succeeds, but ahd_free() calls ahd_shutdown()
only when ahd->init_level == 5, and ahd_shutdown() is where the
timers get removed. Since the freeing of the IRQ is not controlled
by ahd->init_level, we should increment init_level prior to
calling ahd_pci_map_int().
Reported-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_pci.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_pci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c index a734d77e880e..b8423c428a14 100644 --- a/drivers/scsi/aic7xxx/aic79xx_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_pci.c | |||
@@ -377,14 +377,12 @@ ahd_pci_config(struct ahd_softc *ahd, const struct ahd_pci_identity *entry) | |||
377 | error = ahd_init(ahd); | 377 | error = ahd_init(ahd); |
378 | if (error != 0) | 378 | if (error != 0) |
379 | return (error); | 379 | return (error); |
380 | ahd->init_level++; | ||
380 | 381 | ||
381 | /* | 382 | /* |
382 | * Allow interrupts now that we are completely setup. | 383 | * Allow interrupts now that we are completely setup. |
383 | */ | 384 | */ |
384 | error = ahd_pci_map_int(ahd); | 385 | return ahd_pci_map_int(ahd); |
385 | if (!error) | ||
386 | ahd->init_level++; | ||
387 | return error; | ||
388 | } | 386 | } |
389 | 387 | ||
390 | #ifdef CONFIG_PM | 388 | #ifdef CONFIG_PM |