Message ID | 1477772534-14170-13-git-send-email-vivek.gautam@codeaurora.org (mailing list archive) |
---|---|
State | Changes Requested, archived |
Headers | show |
On 2016-10-29 13:22, Vivek Gautam wrote: > 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> > --- > > New patch added in v3 of this cleanup series. > > drivers/scsi/ufs/ufs-qcom.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c > index 9590df5..60a38b1 100644 > --- a/drivers/scsi/ufs/ufs-qcom.c > +++ b/drivers/scsi/ufs/ufs-qcom.c > @@ -1263,7 +1263,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; LGTM, Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index 9590df5..60a38b1 100644 --- a/drivers/scsi/ufs/ufs-qcom.c +++ b/drivers/scsi/ufs/ufs-qcom.c @@ -1263,7 +1263,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;
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> --- New patch added in v3 of this cleanup series. drivers/scsi/ufs/ufs-qcom.c | 1 - 1 file changed, 1 deletion(-)