diff mbox series

[RESEND] drm/tegra: sor: Remove redundant error logging

Message ID Y/+r9jOO0s8sG4pX@ubun2204.myguest.virtualbox.org (mailing list archive)
State New, archived
Headers show
Series [RESEND] drm/tegra: sor: Remove redundant error logging | expand

Commit Message

Deepak R Varma March 1, 2023, 7:48 p.m. UTC
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.

Signed-off-by: Deepak R Varma <drv@mailo.com>
---
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(-)

Comments

Dixit, Ashutosh March 1, 2023, 8:04 p.m. UTC | #1
On Wed, 01 Mar 2023 11:48:06 -0800, Deepak R Varma wrote:
>
> 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.

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

>
> Signed-off-by: Deepak R Varma <drv@mailo.com>
> ---
> 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(-)
>
> diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
> index 8af632740673..ceaebd33408d 100644
> --- a/drivers/gpu/drm/tegra/sor.c
> +++ b/drivers/gpu/drm/tegra/sor.c
> @@ -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
>
>
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 8af632740673..ceaebd33408d 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -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;