mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 1/4] firmware: qcom: scm: Remove log reporting memory allocation failure
@ 2024-03-21 15:23 Mukesh Ojha
  2024-03-21 15:24 ` [PATCH v2 2/4] firmware: scm: Remove redundant scm argument from qcom_scm_waitq_wakeup() Mukesh Ojha
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Mukesh Ojha @ 2024-03-21 15:23 UTC (permalink / raw)
  To: andersson, konrad.dybcio; +Cc: linux-arm-msm, linux-kernel, Mukesh Ojha

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>
---
Changes in v2: https://lore.kernel.org/lkml/20240227155308.18395-7-quic_mojha@quicinc.com/
 - Added R-by tag

 drivers/firmware/qcom/qcom_scm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index 49ddbcab0680..a11fb063cc67 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();
-- 
2.7.4


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-21 22:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-21 15:23 [PATCH v2 1/4] firmware: qcom: scm: Remove log reporting memory allocation failure Mukesh Ojha
2024-03-21 15:24 ` [PATCH v2 2/4] firmware: scm: Remove redundant scm argument from qcom_scm_waitq_wakeup() Mukesh Ojha
2024-03-22 18:22   ` Konrad Dybcio
2024-03-21 15:24 ` [PATCH v2 3/4] firmware: qcom: scm: Rework dload mode availability check Mukesh Ojha
2024-03-22 18:24   ` Konrad Dybcio
2024-03-21 15:24 ` [PATCH v2 4/4] firmware: qcom: scm: Fix __scm and waitq completion variable initialization Mukesh Ojha
2024-04-05 15:40 ` [PATCH v2 1/4] firmware: qcom: scm: Remove log reporting memory allocation failure Mukesh Ojha
2024-04-21 22:29 ` (subset) " Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®