[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240506180309.GG29108@pendragon.ideasonboard.com>
Date: Mon, 6 May 2024 21:03:09 +0300
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Ricardo Ribalda <ribalda@...omium.org>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Ray Jui <rjui@...adcom.com>, Scott Branden <sbranden@...adcom.com>,
linux-media@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Hans Verkuil <hverkuil@...all.nl>
Subject: Re: [PATCH 3/3] media: bcm2835-unicam: Do not replace IRQ retcode
during probe
Hi Ricardo,
Thank you for the patch.
On Tue, Apr 30, 2024 at 07:51:28AM +0000, Ricardo Ribalda wrote:
> Use the error code generated by platform_get_irq() and
> devm_request_irq() as the error code of probe().
>
> It will give a more accurate reason of why it failed.
>
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> ---
> drivers/media/platform/broadcom/bcm2835-unicam.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c
> index b2b23d24da19..0b2729bf4a36 100644
> --- a/drivers/media/platform/broadcom/bcm2835-unicam.c
> +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c
> @@ -2660,17 +2660,13 @@ static int unicam_probe(struct platform_device *pdev)
> }
>
> ret = platform_get_irq(pdev, 0);
> - if (ret < 0) {
> - if (ret != -EPROBE_DEFER)
> - ret = -EINVAL;
> + if (ret < 0)
> goto err_unicam_put;
> - }
I think you can squash the whole patch with 1/3.
>
> ret = devm_request_irq(&pdev->dev, ret, unicam_isr, 0,
> "unicam_capture0", unicam);
> if (ret) {
> dev_err(&pdev->dev, "Unable to request interrupt\n");
> - ret = -EINVAL;
> goto err_unicam_put;
> }
>
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists