mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
remoteproc: qcom: pas: Guard dtb metadata release with dtb_pas_id check
All other call sites of qcom_scm_pas_metadata_release() for the DTB
context are guarded by a check on pas->dtb_pas_id, but the call inside
qcom_pas_load() was not. Fix this by moving the call to the guarded
block.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Fixes: 29814986b8 ("remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading")
Cc: stable@vger.kernel.org
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260724182858.1868271-3-mukesh.ojha@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
parent
142044ea7b
commit
c06c5ab494
|
|
@ -245,17 +245,14 @@ static int qcom_pas_load(struct rproc *rproc, const struct firmware *fw)
|
|||
ret = qcom_mdt_pas_load(pas->dtb_pas_ctx, pas->dtb_firmware,
|
||||
pas->dtb_firmware_name, (__force void *)pas->dtb_mem_region,
|
||||
&pas->dtb_mem_reloc);
|
||||
if (ret)
|
||||
goto release_dtb_metadata;
|
||||
if (ret) {
|
||||
qcom_pas_metadata_release(pas->dtb_pas_ctx);
|
||||
release_firmware(pas->dtb_firmware);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
release_dtb_metadata:
|
||||
qcom_pas_metadata_release(pas->dtb_pas_ctx);
|
||||
release_firmware(pas->dtb_firmware);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void qcom_pas_unmap_carveout(struct rproc *rproc, phys_addr_t mem_phys, size_t size)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user