[PATCH] mailbox: arm_mhuv3: Remove dev_err_probe() if error is -ENOMEM
From: Xichao Zhao
Date: Thu Aug 21 2025 - 05:33:16 EST
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@xxxxxxxx>
---
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