diff mbox series

char: hw_random: delete redundant printing of return value

Message ID 1615621663-1948-1-git-send-email-wangqing@vivo.com
State Accepted
Commit befb1ddaece17e346550b6f2bb494ba58d67af43
Headers show
Series char: hw_random: delete redundant printing of return value | expand

Commit Message

Qing Wang March 13, 2021, 7:47 a.m. UTC
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(-)

Comments

Herbert Xu March 19, 2021, 11:04 a.m. UTC | #1
On Sat, Mar 13, 2021 at 03:47:42PM +0800, Wang Qing wrote:
> 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(-)


Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
diff mbox series

Patch

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);