diff options
author | Mukesh Ojha <quic_mojha@quicinc.com> | 2024-03-21 18:23:59 +0300 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2024-04-21 20:07:10 +0300 |
commit | 3de990f7895906a7a18d2dff63e3e525acaa4ecc (patch) | |
tree | 4643c76325406b6c908b5dc81f16de88299cd07d /drivers | |
parent | d6cbce2cd354c9a37a558f290a8f1dfd20584f99 (diff) | |
download | linux-3de990f7895906a7a18d2dff63e3e525acaa4ecc.tar.xz |
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')
-rw-r--r-- | drivers/firmware/qcom/qcom_scm.c | 5 |
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(); |