@@ -10528,10 +10528,6 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
10528
10528
hba -> is_irq_enabled = true;
10529
10529
}
10530
10530
10531
- err = ufshcd_add_scsi_host (hba );
10532
- if (err )
10533
- goto out_disable ;
10534
-
10535
10531
/* Reset the attached device */
10536
10532
ufshcd_device_reset (hba );
10537
10533
@@ -10543,7 +10539,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
10543
10539
dev_err (hba -> dev , "Host controller enable failed\n" );
10544
10540
ufshcd_print_evt_hist (hba );
10545
10541
ufshcd_print_host_state (hba );
10546
- goto free_tmf_queue ;
10542
+ goto out_disable ;
10547
10543
}
10548
10544
10549
10545
/*
@@ -10578,19 +10574,17 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
10578
10574
*/
10579
10575
ufshcd_set_ufs_dev_active (hba );
10580
10576
10577
+ err = ufshcd_add_scsi_host (hba );
10578
+ if (err )
10579
+ goto out_disable ;
10580
+
10581
10581
async_schedule (ufshcd_async_scan , hba );
10582
10582
ufs_sysfs_add_nodes (hba -> dev );
10583
10583
10584
10584
device_enable_async_suspend (dev );
10585
10585
ufshcd_pm_qos_init (hba );
10586
10586
return 0 ;
10587
10587
10588
- free_tmf_queue :
10589
- blk_mq_destroy_queue (hba -> tmf_queue );
10590
- blk_put_queue (hba -> tmf_queue );
10591
- blk_mq_free_tag_set (& hba -> tmf_tag_set );
10592
- if (hba -> scsi_host_added )
10593
- scsi_remove_host (hba -> host );
10594
10588
out_disable :
10595
10589
hba -> is_irq_enabled = false;
10596
10590
ufshcd_hba_exit (hba );
0 commit comments