]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
firmware: qcom_scm: Remove redundant piece of code
authorMukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Mon, 5 Jan 2026 13:22:50 +0000 (18:52 +0530)
committerBjorn Andersson <andersson@kernel.org>
Tue, 13 Jan 2026 18:14:33 +0000 (12:14 -0600)
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>
drivers/firmware/qcom/qcom_scm.c

index 1a6f85e463e06a12814614cea20719c90a371b69..6461408c58a3ec1ec5cd743ba6835403d6e73669 100644 (file)
@@ -650,8 +650,6 @@ void qcom_scm_pas_metadata_release(struct qcom_scm_pas_metadata *ctx)
        dma_free_coherent(__scm->dev, ctx->size, ctx->ptr, ctx->phys);
 
        ctx->ptr = NULL;
-       ctx->phys = 0;
-       ctx->size = 0;
 }
 EXPORT_SYMBOL_GPL(qcom_scm_pas_metadata_release);