lkml.org 
[lkml]   [2023]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH RESEND] soc/tegra: cbb: Remove redundant error logging
A call to platform_get_irq() already prints an error on failure within
its own implementation. So printing another error based on its return
value in the caller is redundant and should be removed. The clean up
also makes if condition block braces unnecessary. Remove that as well.

Issue identified using platform_get_irq.cocci coccinelle semantic patch.

Signed-off-by: Deepak R Varma <drv@mailo.com>
---
Note:
The patch was successfully build tested for ARM64 config.
Resending the patch for review and feedback.


drivers/soc/tegra/cbb/tegra-cbb.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/tegra/cbb/tegra-cbb.c b/drivers/soc/tegra/cbb/tegra-cbb.c
index a8566b9dd8de..d9ce3d70813a 100644
--- a/drivers/soc/tegra/cbb/tegra-cbb.c
+++ b/drivers/soc/tegra/cbb/tegra-cbb.c
@@ -127,20 +127,16 @@ int tegra_cbb_get_irq(struct platform_device *pdev, unsigned int *nonsec_irq,

if (num_intr == 2) {
irq = platform_get_irq(pdev, index);
- if (irq <= 0) {
- dev_err(&pdev->dev, "failed to get non-secure IRQ: %d\n", irq);
+ if (irq <= 0)
return -ENOENT;
- }

*nonsec_irq = irq;
index++;
}

irq = platform_get_irq(pdev, index);
- if (irq <= 0) {
- dev_err(&pdev->dev, "failed to get secure IRQ: %d\n", irq);
+ if (irq <= 0)
return -ENOENT;
- }

*sec_irq = irq;

--
2.34.1


\
 
 \ /
  Last update: 2023-03-27 00:41    [W:0.023 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site