From: Dmitry Osipenko <digetx@gmail.com>
To: Miaoqian Lin <linmq006@gmail.com>,
Laxman Dewangan <ldewangan@nvidia.com>,
Mark Brown <broonie@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-spi@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] spi: tegra20: Fix missing IRQ check in tegra_slink_probe
Date: Fri, 28 Jan 2022 19:37:41 +0300 [thread overview]
Message-ID: <adfcf465-cff1-e15e-89fa-fdc573b7820f@gmail.com> (raw)
In-Reply-To: <20220128161807.10145-1-linmq006@gmail.com>
28.01.2022 19:18, Miaoqian Lin пишет:
> This func misses checking for platform_get_irq()'s call and may passes the
> negative error codes to request_threaded_irq(), which takes unsigned IRQ #,
> causing it to fail with -EINVAL, overriding an original error code.
> Stop calling request_threaded_irq() with invalid IRQ #s.
>
> Fixes: e4bb903fda0e ("spi: tegra20-slink: Improve runtime PM usage")
I don't see how this patch is related to e4bb903fda0e. This tag is
incorrect and should be removed.
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
> Changes in v2:
> - fix wrong func name in commit message.
> ---
> drivers/spi/spi-tegra20-slink.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
> index 2a03739a0c60..0eea35882777 100644
> --- a/drivers/spi/spi-tegra20-slink.c
> +++ b/drivers/spi/spi-tegra20-slink.c
> @@ -1100,6 +1100,11 @@ static int tegra_slink_probe(struct platform_device *pdev)
> reset_control_deassert(tspi->rst);
>
> spi_irq = platform_get_irq(pdev, 0);
> + if (spi_irq < 0) {
> + dev_err(&pdev->dev, "Unable to request IRQ: %d\n", ret);
The "ret" isn't assigned to spi_irq in the error message.
Moreover, platform_get_irq() already prints error message [1] by itself.
The duplicated message is unnecessary and should be removed.
[1]
https://elixir.bootlin.com/linux/v5.17-rc1/source/drivers/base/platform.c#L256
next prev parent reply other threads:[~2022-01-28 16:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 16:18 [PATCH v2] spi: tegra20: Fix missing IRQ check in tegra_slink_probe Miaoqian Lin
2022-01-28 16:37 ` Dmitry Osipenko [this message]
2022-01-28 16:47 ` [PATCH v3] " Miaoqian Lin
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=adfcf465-cff1-e15e-89fa-fdc573b7820f@gmail.com \
--to=digetx@gmail.com \
--cc=broonie@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linmq006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.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).