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

Uwe Kleine-König <[email protected]>
Newsgroups org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-rockchip,org.kernel.vger.linux-kernel
Message-ID <d9fe1f923698066ba364295df7519770e2dc8557.1787667315.git.ukleinek@kernel.org>
From: Uwe Kleine-König <[email protected]>

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 <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.