* [PATCH] slimbus: qcom: fix error check return value of platform_get_irq()
@ 2022-04-12 9:02 ` cgel.zte
0 siblings, 0 replies; 6+ messages in thread
From: cgel.zte @ 2022-04-12 9:02 UTC (permalink / raw)
To: agross, bjorn.andersson, srinivas.kandagatla
Cc: alsa-devel, gregkh, Lv Ruyi, Zeal Robot, linux-kernel,
linux-arm-msm, sdharia
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>
---
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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] slimbus: qcom: fix error check return value of platform_get_irq()
@ 2022-04-12 9:02 ` cgel.zte
0 siblings, 0 replies; 6+ messages in thread
From: cgel.zte @ 2022-04-12 9:02 UTC (permalink / raw)
To: agross, bjorn.andersson, srinivas.kandagatla
Cc: gregkh, sdharia, linux-arm-msm, alsa-devel, linux-kernel,
Lv Ruyi, Zeal Robot
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>
---
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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] slimbus: qcom: fix error check return value of platform_get_irq()
2022-04-12 9:02 ` cgel.zte
@ 2022-04-12 14:29 ` Bjorn Andersson
-1 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2022-04-12 14:29 UTC (permalink / raw)
To: cgel.zte
Cc: agross, srinivas.kandagatla, gregkh, sdharia, linux-arm-msm,
alsa-devel, linux-kernel, Lv Ruyi, Zeal Robot
On Tue 12 Apr 04:02 CDT 2022, 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>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> 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;
> }
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] slimbus: qcom: fix error check return value of platform_get_irq()
@ 2022-04-12 14:29 ` Bjorn Andersson
0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2022-04-12 14:29 UTC (permalink / raw)
To: cgel.zte
Cc: alsa-devel, gregkh, Lv Ruyi, Zeal Robot, linux-kernel, agross,
srinivas.kandagatla, linux-arm-msm, sdharia
On Tue 12 Apr 04:02 CDT 2022, 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>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> 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;
> }
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] slimbus: qcom: fix error check return value of platform_get_irq()
2022-04-12 9:02 ` cgel.zte
@ 2022-04-12 15:01 ` Srinivas Kandagatla
-1 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2022-04-12 15:01 UTC (permalink / raw)
To: cgel.zte, agross, bjorn.andersson
Cc: gregkh, sdharia, linux-arm-msm, alsa-devel, linux-kernel,
Lv Ruyi, Zeal Robot
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;
> }
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] slimbus: qcom: fix error check return value of platform_get_irq()
@ 2022-04-12 15:01 ` Srinivas Kandagatla
0 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2022-04-12 15:01 UTC (permalink / raw)
To: cgel.zte, agross, bjorn.andersson
Cc: alsa-devel, gregkh, Lv Ruyi, Zeal Robot, linux-kernel,
linux-arm-msm, sdharia
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;
> }
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-04-12 15:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12 9:02 [PATCH] slimbus: qcom: fix error check return value of platform_get_irq() cgel.zte
2022-04-12 9:02 ` cgel.zte
2022-04-12 14:29 ` Bjorn Andersson
2022-04-12 14:29 ` Bjorn Andersson
2022-04-12 15:01 ` Srinivas Kandagatla
2022-04-12 15:01 ` Srinivas Kandagatla
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.