Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[linux-2.6.git] / arch / ia64 / hp / sim / simscsi.c
index 4552a1c..d62fa76 100644 (file)
@@ -372,8 +372,13 @@ simscsi_init(void)
                return -ENOMEM;
 
        error = scsi_add_host(host, NULL);
-       if (!error)
-               scsi_scan_host(host);
+       if (error)
+               goto free_host;
+       scsi_scan_host(host);
+       return 0;
+
+ free_host:
+       scsi_host_put(host);
        return error;
 }