aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ibmvscsi')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvstgt.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c
index 2a5b29d12172..e2dd6a45924a 100644
--- a/drivers/scsi/ibmvscsi/ibmvstgt.c
+++ b/drivers/scsi/ibmvscsi/ibmvstgt.c
@@ -864,21 +864,23 @@ static int ibmvstgt_probe(struct vio_dev *dev, const struct vio_device_id *id)
864 864
865 INIT_WORK(&vport->crq_work, handle_crq); 865 INIT_WORK(&vport->crq_work, handle_crq);
866 866
867 err = crq_queue_create(&vport->crq_queue, target); 867 err = scsi_add_host(shost, target->dev);
868 if (err) 868 if (err)
869 goto free_srp_target; 869 goto free_srp_target;
870 870
871 err = scsi_add_host(shost, target->dev); 871 err = scsi_tgt_alloc_queue(shost);
872 if (err) 872 if (err)
873 goto destroy_queue; 873 goto remove_host;
874 874
875 err = scsi_tgt_alloc_queue(shost); 875 err = crq_queue_create(&vport->crq_queue, target);
876 if (err) 876 if (err)
877 goto destroy_queue; 877 goto free_queue;
878 878
879 return 0; 879 return 0;
880destroy_queue: 880free_queue:
881 crq_queue_destroy(target); 881 scsi_tgt_free_queue(shost);
882remove_host:
883 scsi_remove_host(shost);
882free_srp_target: 884free_srp_target:
883 srp_target_free(target); 885 srp_target_free(target);
884put_host: 886put_host: