[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWD+FXt-rUz6oiU9MNq3EiKExgic17kCnUjynidii470w@mail.gmail.com>
Date: Thu, 21 Oct 2021 09:59:18 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Tang Bin <tangbin@...s.chinamobile.com>
Cc: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: rcar_fdp1: Fix the correct variable assignments
Hi Tang,
Thanks for your patch!
On Thu, Oct 21, 2021 at 5:10 AM Tang Bin <tangbin@...s.chinamobile.com> wrote:
> In the function fdp1_probe(), when get irq failed, the
> function platform_get_irq() log an error message, so
> remove redundant message here. And the variable type
> of "ret" is int, the "fdp1->irq" is unsigned int, when
> irq failed, this place maybe wrong, thus fix it.
The second issue is not actually present, as the error check
operates on ret, not fdp1->irq?
> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
> --- a/drivers/media/platform/rcar_fdp1.c
> +++ b/drivers/media/platform/rcar_fdp1.c
> @@ -2289,11 +2289,10 @@ static int fdp1_probe(struct platform_device *pdev)
> return PTR_ERR(fdp1->regs);
>
> /* Interrupt service routine registration */
> - fdp1->irq = ret = platform_get_irq(pdev, 0);
> - if (ret < 0) {
> - dev_err(&pdev->dev, "cannot find IRQ\n");
> + ret = platform_get_irq(pdev, 0);
> + if (ret < 0)
> return ret;
> - }
> + fdp1->irq = ret;
>
> ret = devm_request_irq(&pdev->dev, fdp1->irq, fdp1_irq_handler, 0,
> dev_name(&pdev->dev), fdp1);
Anyway, the code is correct, so:
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists