drm/tegra: sor: Remove redundant error logging
PATCH RESEND 1/1 drm/tegra: sor: 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 coccicheck script.
---
Note:
Resending the patch for review and feedback. Originally sent on Dec 12 2022.
drivers/gpu/drm/tegra/sor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/tegra/sor.c +1 -3
@@ -3799,10 +3799,8 @@ static int tegra_sor_probe(struct platform_device *pdev) } err =platform_get_irq (pdev,0 ); -if (err <0 ) { -dev_err (&pdev->dev,"failed to get IRQ: %d\n" , err); +if (err <0 ) goto remove; - } sor->irq = err;
Signature · 1 line
2.34.1
Quoted 7 lines · Deepak R Varma
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.coccicoccicheck script.
Quoted 30 lines
Signed-off-by Deepak R Varma <[email protected]>---
Note:
Resending the patch for review and feedback. Originally sent on Dec 12 2022.drivers/gpu/drm/tegra/sor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/tegra/sor.c +1
-4@@ -3799,10 +3799,8 @@ static int tegra_sor_probe(struct platform_device *pdev) } err =platform_get_irq (pdev,0 ); -if (err <0 ) { -dev_err (&pdev->dev,"failed to get IRQ: %d\n" , err); +if (err <0 ) goto remove; - } sor->irq = err; --2.34.1