]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scsi: ufs: qcom: Don't free resource-managed kmalloc element
authorVivek Gautam <vivek.gautam@codeaurora.org>
Tue, 8 Nov 2016 10:07:51 +0000 (15:37 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 Nov 2016 23:05:45 +0000 (18:05 -0500)
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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs-qcom.c

index 31df7838f7908fcbb9b0c2b23a969cfed2e91899..804f4e70c771d65d49ac4fadd1b8d7403a81ddf4 100644 (file)
@@ -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;