diff mbox series

[2/3] media: bcm2835-unicam: Do not print error when irq not found

Message ID 20240430-fix-broad-v1-2-cf3b81bf97ff@chromium.org
State New
Headers show
Series media: bcm2835-unicam: Improve error handling during probe | expand

Commit Message

Ricardo Ribalda April 30, 2024, 7:51 a.m. UTC
platform_get_irq() already prints an error for us.

Fixes cocci:
drivers/media/platform/broadcom/bcm2835-unicam.c:2664:2-9: line 2664 is redundant because platform_get_irq() already prints an error

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/platform/broadcom/bcm2835-unicam.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Laurent Pinchart May 6, 2024, 6:01 p.m. UTC | #1
Hi Ricardo,

Thank you for the patch.

On Tue, Apr 30, 2024 at 07:51:27AM +0000, Ricardo Ribalda wrote:
> platform_get_irq() already prints an error for us.
> 
> Fixes cocci:
> drivers/media/platform/broadcom/bcm2835-unicam.c:2664:2-9: line 2664 is redundant because platform_get_irq() already prints an error
> 
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/platform/broadcom/bcm2835-unicam.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c
> index 2a3a27ac70ba..b2b23d24da19 100644
> --- a/drivers/media/platform/broadcom/bcm2835-unicam.c
> +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c
> @@ -2661,7 +2661,6 @@ static int unicam_probe(struct platform_device *pdev)
>  
>  	ret = platform_get_irq(pdev, 0);
>  	if (ret < 0) {
> -		dev_err(&pdev->dev, "No IRQ resource\n");
>  		if (ret != -EPROBE_DEFER)
>  			ret = -EINVAL;
>  		goto err_unicam_put;
diff mbox series

Patch

diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c
index 2a3a27ac70ba..b2b23d24da19 100644
--- a/drivers/media/platform/broadcom/bcm2835-unicam.c
+++ b/drivers/media/platform/broadcom/bcm2835-unicam.c
@@ -2661,7 +2661,6 @@  static int unicam_probe(struct platform_device *pdev)
 
 	ret = platform_get_irq(pdev, 0);
 	if (ret < 0) {
-		dev_err(&pdev->dev, "No IRQ resource\n");
 		if (ret != -EPROBE_DEFER)
 			ret = -EINVAL;
 		goto err_unicam_put;