diff options
Diffstat (limited to 'arch/ia64/hp/sim/simscsi.c')
-rw-r--r-- | arch/ia64/hp/sim/simscsi.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c index 4552a1cf5b33..d62fa76e5a7d 100644 --- a/arch/ia64/hp/sim/simscsi.c +++ b/arch/ia64/hp/sim/simscsi.c | |||
@@ -372,8 +372,13 @@ simscsi_init(void) | |||
372 | return -ENOMEM; | 372 | return -ENOMEM; |
373 | 373 | ||
374 | error = scsi_add_host(host, NULL); | 374 | error = scsi_add_host(host, NULL); |
375 | if (!error) | 375 | if (error) |
376 | scsi_scan_host(host); | 376 | goto free_host; |
377 | scsi_scan_host(host); | ||
378 | return 0; | ||
379 | |||
380 | free_host: | ||
381 | scsi_host_put(host); | ||
377 | return error; | 382 | return error; |
378 | } | 383 | } |
379 | 384 | ||