[RESEND] soc/tegra: cbb: Remove redundant error logging
Commit Message
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(-)
@@ -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;