linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] char: hw_random: delete redundant printing of return value
@ 2021-03-13  7:47 Wang Qing
  2021-03-19 11:04 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Qing @ 2021-03-13  7:47 UTC (permalink / raw)
  To: Hadar Gat, Matt Mackall, Herbert Xu, linux-crypto, linux-kernel; +Cc: Wang Qing

platform_get_irq() has already checked and printed the return value, 
the printing here is nothing special, it is not necessary at all.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 drivers/char/hw_random/cctrng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index 7a293f2..1e551e3
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -527,10 +527,8 @@ static int cctrng_probe(struct platform_device *pdev)
 
 	/* Then IRQ */
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "Failed getting IRQ resource\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	/* parse sampling rate from device tree */
 	rc = cc_trng_parse_sampling_ratio(drvdata);
-- 
2.7.4


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

end of thread, other threads:[~2021-03-19 11:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13  7:47 [PATCH] char: hw_random: delete redundant printing of return value Wang Qing
2021-03-19 11:04 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).