aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index d866213f42b8..fd389e9f9460 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -1061,10 +1061,11 @@ uint32_t aic7xxx_verbose;
1061int 1061int
1062ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *template) 1062ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *template)
1063{ 1063{
1064 char buf[80]; 1064 char buf[80];
1065 struct Scsi_Host *host; 1065 struct Scsi_Host *host;
1066 char *new_name; 1066 char *new_name;
1067 u_long s; 1067 u_long s;
1068 int retval;
1068 1069
1069 template->name = ahc->description; 1070 template->name = ahc->description;
1070 host = scsi_host_alloc(template, sizeof(struct ahc_softc *)); 1071 host = scsi_host_alloc(template, sizeof(struct ahc_softc *));
@@ -1097,9 +1098,16 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
1097 1098
1098 host->transportt = ahc_linux_transport_template; 1099 host->transportt = ahc_linux_transport_template;
1099 1100
1100 scsi_add_host(host, (ahc->dev_softc ? &ahc->dev_softc->dev : NULL)); /* XXX handle failure */ 1101 retval = scsi_add_host(host,
1102 (ahc->dev_softc ? &ahc->dev_softc->dev : NULL));
1103 if (retval) {
1104 printk(KERN_WARNING "aic7xxx: scsi_add_host failed\n");
1105 scsi_host_put(host);
1106 return retval;
1107 }
1108
1101 scsi_scan_host(host); 1109 scsi_scan_host(host);
1102 return (0); 1110 return 0;
1103} 1111}
1104 1112
1105/* 1113/*