linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Tang Bin <tangbin@cmss.chinamobile.com>
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: rcar_fdp1: Fix the correct variable assignments
Date: Thu, 21 Oct 2021 09:59:18 +0200	[thread overview]
Message-ID: <CAMuHMdWD+FXt-rUz6oiU9MNq3EiKExgic17kCnUjynidii470w@mail.gmail.com> (raw)
In-Reply-To: <20211021030938.51884-1-tangbin@cmss.chinamobile.com>

Hi Tang,

Thanks for your patch!

On Thu, Oct 21, 2021 at 5:10 AM Tang Bin <tangbin@cmss.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@cmss.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@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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

  reply	other threads:[~2021-10-21  7:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21  3:09 [PATCH] media: rcar_fdp1: Fix the correct variable assignments Tang Bin
2021-10-21  7:59 ` Geert Uytterhoeven [this message]
2021-10-21  9:08   ` Kieran Bingham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMuHMdWD+FXt-rUz6oiU9MNq3EiKExgic17kCnUjynidii470w@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=tangbin@cmss.chinamobile.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).