aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/hp/sim/simscsi.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c
index e62694f8ef75..a43e1e1822ad 100644
--- a/arch/ia64/hp/sim/simscsi.c
+++ b/arch/ia64/hp/sim/simscsi.c
@@ -373,8 +373,13 @@ simscsi_init(void)
373 return -ENOMEM; 373 return -ENOMEM;
374 374
375 error = scsi_add_host(host, NULL); 375 error = scsi_add_host(host, NULL);
376 if (!error) 376 if (error)
377 scsi_scan_host(host); 377 goto free_host;
378 scsi_scan_host(host);
379 return 0;
380
381 free_host:
382 scsi_host_put(host);
378 return error; 383 return error;
379} 384}
380 385