All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mailbox: arm_mhuv3: Remove dev_err_probe() if error is -ENOMEM
@ 2025-08-21  9:32 Xichao Zhao
  2025-08-21  9:53 ` Sudeep Holla
  0 siblings, 1 reply; 3+ messages in thread
From: Xichao Zhao @ 2025-08-21  9:32 UTC (permalink / raw)
  To: sudeep.holla, cristian.marussi, jassisinghbrar; +Cc: linux-kernel, Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/mailbox/arm_mhuv3.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mailbox/arm_mhuv3.c b/drivers/mailbox/arm_mhuv3.c
index b97e79a5870f..cae1f9bea050 100644
--- a/drivers/mailbox/arm_mhuv3.c
+++ b/drivers/mailbox/arm_mhuv3.c
@@ -775,8 +775,7 @@ static int mhuv3_initialize_channels(struct device *dev, struct mhuv3 *mhu)
 	mbox->chans = devm_kcalloc(dev, mhu->num_chans,
 				   sizeof(*mbox->chans), GFP_KERNEL);
 	if (!mbox->chans)
-		return dev_err_probe(dev, -ENOMEM,
-				     "Failed to initialize channels\n");
+		return -ENOMEM;
 
 	for (i = 0; i < NUM_EXT && !ret; i++)
 		if (mhu->ext[i])
-- 
2.34.1


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

end of thread, other threads:[~2025-08-21 10:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21  9:32 [PATCH] mailbox: arm_mhuv3: Remove dev_err_probe() if error is -ENOMEM Xichao Zhao
2025-08-21  9:53 ` Sudeep Holla
2025-08-21 10:00   ` Cristian Marussi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.