aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_pci.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2009-03-25 06:19:37 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-04-03 10:22:55 -0400
commita2f5bfcf711aa72ad5587b533a1909334c2533a4 (patch)
treebaf8be9fb21f8890087981bcd6fb173c1c65d238 /drivers/scsi/aic7xxx/aic7xxx_pci.c
parentc59c61493febac295e71a2c017fc0075620dbc6f (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/aic7xxx_pci.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_pci.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c
index c07cb6eebb02..4347c8dc459f 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_pci.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c
@@ -960,16 +960,12 @@ ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry)
960 error = ahc_init(ahc); 960 error = ahc_init(ahc);
961 if (error != 0) 961 if (error != 0)
962 return (error); 962 return (error);
963 ahc->init_level++;
963 964
964 /* 965 /*
965 * Allow interrupts now that we are completely setup. 966 * Allow interrupts now that we are completely setup.
966 */ 967 */
967 error = ahc_pci_map_int(ahc); 968 return ahc_pci_map_int(ahc);
968 if (error != 0)
969 return (error);
970
971 ahc->init_level++;
972 return (0);
973} 969}
974 970
975/* 971/*