public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: andy.shevchenko@gmail.com
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: linus.walleij@linaro.org, brgl@bgdev.pl, palmer@dabbelt.com,
	paul.walmsley@sifive.com, linux-gpio@vger.kernel.org,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: sifive: Add missing check for platform_get_irq
Date: Fri, 2 Jun 2023 04:34:40 +0300	[thread overview]
Message-ID: <ZHlHMFRdTdpAhqf1@surfacebook> (raw)
In-Reply-To: <20230601082440.30110-1-jiasheng@iscas.ac.cn>

Thu, Jun 01, 2023 at 04:24:40PM +0800, Jiasheng Jiang kirjoitti:
> Add missing check for platform_get_irq and return error

Also refer to the functions as func(), like platform_get_irq().

> if it fails.

...

> +	for (i = 0; i < ngpio; i++) {
>  		chip->irq_number[i] = platform_get_irq(pdev, i);
> +		if (chip->irq_number[i] < 0)
> +			return -ENODEV;

Same as per the other email, why has the error code to be shadow?

> +	}

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2023-06-02  1:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01  8:24 [PATCH] gpio: sifive: Add missing check for platform_get_irq Jiasheng Jiang
2023-06-02  1:34 ` andy.shevchenko [this message]

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=ZHlHMFRdTdpAhqf1@surfacebook \
    --to=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=jiasheng@iscas.ac.cn \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.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