[PATCH v1 3/3] mailbox: rockchip: Convert to use dev_err_probe()

From: Uwe Kleine-König

Date: Tue Aug 25 2026 - 10:34:44 EST


From: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx>

This is more compact in source code and also compiles to smaller code.

Bloat-o-meter reports:

add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-76 (-76)
Function old new delta
rockchip_mbox_probe 1596 1592 -4
_entry_ptr 24 16 -8
__func__ 62 42 -20
_entry 132 88 -44
Total: Before=6693, After=6617, chg -1.14%

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx>
---
drivers/mailbox/rockchip-mailbox.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mailbox/rockchip-mailbox.c b/drivers/mailbox/rockchip-mailbox.c
index ada2bd419880..790c34a22ec5 100644
--- a/drivers/mailbox/rockchip-mailbox.c
+++ b/drivers/mailbox/rockchip-mailbox.c
@@ -215,9 +215,9 @@ static int rockchip_mbox_probe(struct platform_device *pdev)

ret = devm_mbox_controller_register(&pdev->dev, &mb->mbox);
if (ret < 0)
- dev_err(&pdev->dev, "Failed to register mailbox: %d\n", ret);
+ return dev_err_probe(&pdev->dev, ret, "Failed to register mailbox\n");

- return ret;
+ return 0;
}

static struct platform_driver rockchip_mbox_driver = {
--
2.55.0.11.g153666a7d9bb