diff mbox

[v5,12/12] scsi/ufs: qcom: Don't free resource-managed kmalloc element

Message ID 1478599671-13071-13-git-send-email-vivek.gautam@codeaurora.org (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Vivek Gautam Nov. 8, 2016, 10:07 a.m. UTC
Host is allocated by managed kmalloc (devm_kmalloc). The
memory allocated with this function is automatically
freed on driver detach.
So, no need to make an exclusive free call over it.

Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
---
 drivers/scsi/ufs/ufs-qcom.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 31df783..804f4e7 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -1268,7 +1268,6 @@  static int ufs_qcom_init(struct ufs_hba *hba)
 out_unregister_bus:
 	phy_exit(host->generic_phy);
 out_host_free:
-	devm_kfree(dev, host);
 	ufshcd_set_variant(hba, NULL);
 out:
 	return err;