Yes, scsi_add_host has been moved the async function (ufshcd_device_init)as MCQ patch applied. So the ufshcd driver attaches the device without knowing whether the probe fails or not. and if host tries to remove ufshcd driver, it makes kernel panic. So it became necessary to check whether to add a host or not. --------- Original Message --------- Sender : Bart Van Assche <bvanassche@xxxxxxx> Date : 2024-06-28 01:25 (GMT+9) Title : Re: [PATCH] ufs: core: Remove scsi host only if added On 6/27/24 1:51 AM, 김경률 wrote: > @@ -10638,6 +10639,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) > dev_err(hba->dev, "scsi_add_host failed\n"); > goto out_disable; > } > + hba->scsi_host_added = true; > } > Why has no "hba->scsi_host_added = true" assignment been added in ufshcd_device_init()? Isn't that a bug? Bart.