From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: cgel.zte@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org
Cc: gregkh@linuxfoundation.org, sdharia@codeaurora.org,
linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, Lv Ruyi <lv.ruyi@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] slimbus: qcom: fix error check return value of platform_get_irq()
Date: Tue, 12 Apr 2022 16:01:04 +0100 [thread overview]
Message-ID: <149e3140-1b9d-b864-c14c-4d2cb098ec9a@linaro.org> (raw)
In-Reply-To: <20220412090259.2533316-1-lv.ruyi@zte.com.cn>
On 12/04/2022 10:02, cgel.zte@gmail.com wrote:
> From: Lv Ruyi <lv.ruyi@zte.com.cn>
>
> platform_get_irq() return negative value on failure, so null check of
> ctrl->irq is incorrect. Fix it by comparing whether it is less than zero.
>
> Fixes: ad7fcbc308b0 ("slimbus: qcom: Add Qualcomm Slimbus controller driver")
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
There was already a patch posted to fix this
https://git.kernel.org/pub/scm/linux/kernel/git/srini/slimbus.git/commit/?h=for-next&id=54bf672111eef18819fa6e562f68b2d6c449b05d
--srini
> ---
> drivers/slimbus/qcom-ctrl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
> index f04b961b96cd..b2f01e155d77 100644
> --- a/drivers/slimbus/qcom-ctrl.c
> +++ b/drivers/slimbus/qcom-ctrl.c
> @@ -510,7 +510,7 @@ static int qcom_slim_probe(struct platform_device *pdev)
> }
>
> ctrl->irq = platform_get_irq(pdev, 0);
> - if (!ctrl->irq) {
> + if (ctrl->irq < 0) {
> dev_err(&pdev->dev, "no slimbus IRQ\n");
> return -ENODEV;
> }
prev parent reply other threads:[~2022-04-12 15:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-12 9:02 cgel.zte
2022-04-12 14:29 ` Bjorn Andersson
2022-04-12 15:01 ` Srinivas Kandagatla [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=149e3140-1b9d-b864-c14c-4d2cb098ec9a@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=agross@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=bjorn.andersson@linaro.org \
--cc=cgel.zte@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.ruyi@zte.com.cn \
--cc=sdharia@codeaurora.org \
--cc=zealci@zte.com.cn \
/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
all inboxes | Powered by JetHome®