summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/qcom
diff options
context:
space:
mode:
authorMukesh Ojha <quic_mojha@quicinc.com>2024-03-21 16:23:59 +0100
committerBjorn Andersson <andersson@kernel.org>2024-04-21 19:07:10 +0200
commit3de990f7895906a7a18d2dff63e3e525acaa4ecc (patch)
tree4643c76325406b6c908b5dc81f16de88299cd07d /drivers/firmware/qcom
parentsoc: qcom: pmic_glink: notify clients about the current state (diff)
downloadlinux-3de990f7895906a7a18d2dff63e3e525acaa4ecc.tar.xz
linux-3de990f7895906a7a18d2dff63e3e525acaa4ecc.zip
firmware: qcom: scm: Remove log reporting memory allocation failure
Remove redundant memory allocation failure. WARNING: Possible unnecessary 'out of memory' message + if (!mdata_buf) { + dev_err(__scm->dev, "Allocation of metadata buffer failed.\n"); Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com> Reviewed-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/1711034642-22860-1-git-send-email-quic_mojha@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'drivers/firmware/qcom')
-rw-r--r--drivers/firmware/qcom/qcom_scm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index 81c15aeff934..137bda5a0a63 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -554,10 +554,9 @@ int qcom_scm_pas_init_image(u32 peripheral, const void *metadata, size_t size,
*/
mdata_buf = dma_alloc_coherent(__scm->dev, size, &mdata_phys,
GFP_KERNEL);
- if (!mdata_buf) {
- dev_err(__scm->dev, "Allocation of metadata buffer failed.\n");
+ if (!mdata_buf)
return -ENOMEM;
- }
+
memcpy(mdata_buf, metadata, size);
ret = qcom_scm_clk_enable();