mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
scsi: ufs-qcom: Remove unnecessary devm_kfree
Resources allocated with devm_* are managed by device driver framework, meaning the resources will be automatically released when the associated device is removed. Besides, having a devm_kfree here would cause a use-after-free scenario: after hba->host is freed up, data inside hba->host shall still be accessed when device driver framework frees up all resources associated with hba->dev. hba->host->rcdev, for example, shall be used by func devm_reset_controller_release() when resources associated with hba->dev are freed up. Change-Id: I90bab41c34450a1c814d863b9f3653228f5eeb95 Signed-off-by: Can Guo <cang@codeaurora.org>
This commit is contained in:
parent
8611eb0c52
commit
c2825345ea
1 changed files with 0 additions and 1 deletions
|
|
@ -2311,7 +2311,6 @@ out_disable_vddp:
|
|||
out_phy_exit:
|
||||
phy_exit(host->generic_phy);
|
||||
out_variant_clear:
|
||||
devm_kfree(dev, host);
|
||||
ufshcd_set_variant(hba, NULL);
|
||||
out:
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Reference in a new issue