mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
UPSTREAM: scsi: ufs: Remove unnecessary devm_kfree()
The memory allocated with devm_kzalloc() is freed automatically no need to
explicitly call devm_kfree(). Delete it and save some instruction cycles.
Link: https://lore.kernel.org/r/20210112092128.19295-1-huobean@gmail.com
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit b64750a1b6)
Bug: 204438323
Change-Id: I05096acb5bd2872270e531cd6803ebcc9f35bd30
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Bart Van Assche
parent
e9ca328c8c
commit
77de4fc3c1
@@ -198,7 +198,7 @@ int ufshcd_hba_init_crypto_capabilities(struct ufs_hba *hba)
|
||||
err = devm_blk_ksm_init(hba->dev, &hba->ksm,
|
||||
hba->crypto_capabilities.config_count + 1);
|
||||
if (err)
|
||||
goto out_free_caps;
|
||||
goto out;
|
||||
|
||||
hba->ksm.ksm_ll_ops = ufshcd_ksm_ops;
|
||||
/* UFS only supports 8 bytes for any DUN */
|
||||
@@ -225,8 +225,6 @@ int ufshcd_hba_init_crypto_capabilities(struct ufs_hba *hba)
|
||||
|
||||
return 0;
|
||||
|
||||
out_free_caps:
|
||||
devm_kfree(hba->dev, hba->crypto_cap_array);
|
||||
out:
|
||||
/* Indicate that init failed by clearing UFSHCD_CAP_CRYPTO */
|
||||
hba->caps &= ~UFSHCD_CAP_CRYPTO;
|
||||
|
||||
Reference in New Issue
Block a user