aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_osm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_osm.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 876d1de8480..6ee1435d37f 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -1209,11 +1209,6 @@ ahc_platform_free(struct ahc_softc *ahc)
1209 int i, j; 1209 int i, j;
1210 1210
1211 if (ahc->platform_data != NULL) { 1211 if (ahc->platform_data != NULL) {
1212 if (ahc->platform_data->host != NULL) {
1213 scsi_remove_host(ahc->platform_data->host);
1214 scsi_host_put(ahc->platform_data->host);
1215 }
1216
1217 /* destroy all of the device and target objects */ 1212 /* destroy all of the device and target objects */
1218 for (i = 0; i < AHC_NUM_TARGETS; i++) { 1213 for (i = 0; i < AHC_NUM_TARGETS; i++) {
1219 starget = ahc->platform_data->starget[i]; 1214 starget = ahc->platform_data->starget[i];
@@ -1242,6 +1237,9 @@ ahc_platform_free(struct ahc_softc *ahc)
1242 0x1000); 1237 0x1000);
1243 } 1238 }
1244 1239
1240 if (ahc->platform_data->host)
1241 scsi_host_put(ahc->platform_data->host);
1242
1245 free(ahc->platform_data, M_DEVBUF); 1243 free(ahc->platform_data, M_DEVBUF);
1246 } 1244 }
1247} 1245}