mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] hwrng: hisi - use dev_err_probe
@ 2024-02-26 18:57 Martin Kaiser
  2024-02-27 12:20 ` Jonathan Cameron
  2024-03-08 11:24 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Martin Kaiser @ 2024-02-26 18:57 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, linux-arm-kernel, linux-kernel, Martin Kaiser

Replace dev_err + return with dev_err_probe.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/char/hw_random/hisi-rng.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/char/hw_random/hisi-rng.c b/drivers/char/hw_random/hisi-rng.c
index b6f27566e0ba..4e501d5c121f 100644
--- a/drivers/char/hw_random/hisi-rng.c
+++ b/drivers/char/hw_random/hisi-rng.c
@@ -89,10 +89,8 @@ static int hisi_rng_probe(struct platform_device *pdev)
 	rng->rng.read = hisi_rng_read;
 
 	ret = devm_hwrng_register(&pdev->dev, &rng->rng);
-	if (ret) {
-		dev_err(&pdev->dev, "failed to register hwrng\n");
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(&pdev->dev, ret, "failed to register hwrng\n");
 
 	return 0;
 }
-- 
2.39.2


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

end of thread, other threads:[~2024-03-08 11:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26 18:57 [PATCH] hwrng: hisi - use dev_err_probe Martin Kaiser
2024-02-27 12:20 ` Jonathan Cameron
2024-03-08 11:24 ` Herbert Xu

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®