Skip to content

Commit 25906ae

Browse files
mukeshojha-linuxandersson
authored andcommitted
firmware: qcom_scm: Remove redundant piece of code
The qcom_scm_pas_metadata_release() function already frees the allocated memory and sets ctx->ptr to NULL. Resetting ctx->phys and ctx->size to zero is unnecessary because the context is expected to be discarded after release. Lets removes redundant assignments. Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260105-kvmrprocv10-v10-2-022e96815380@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent ebb0bbe commit 25906ae

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

drivers/firmware/qcom/qcom_scm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,6 @@ void qcom_scm_pas_metadata_release(struct qcom_scm_pas_metadata *ctx)
650650
dma_free_coherent(__scm->dev, ctx->size, ctx->ptr, ctx->phys);
651651

652652
ctx->ptr = NULL;
653-
ctx->phys = 0;
654-
ctx->size = 0;
655653
}
656654
EXPORT_SYMBOL_GPL(qcom_scm_pas_metadata_release);
657655

0 commit comments

Comments
 (0)