All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] slimbus: Fixes for 5.18
@ 2022-04-29 16:49 Srinivas Kandagatla
  2022-04-29 16:49 ` [PATCH 1/1] slimbus: qcom: Fix IRQ check in qcom_slim_probe Srinivas Kandagatla
  0 siblings, 1 reply; 2+ messages in thread
From: Srinivas Kandagatla @ 2022-04-29 16:49 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Srinivas Kandagatla

Hi Greg,

Here is one SLIMbus fix for 5.18.
Can you please queue this up for 5.18.

Thanks,
Srini

Miaoqian Lin (1):
  slimbus: qcom: Fix IRQ check in qcom_slim_probe

 drivers/slimbus/qcom-ctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] slimbus: qcom: Fix IRQ check in qcom_slim_probe
  2022-04-29 16:49 [PATCH 0/1] slimbus: Fixes for 5.18 Srinivas Kandagatla
@ 2022-04-29 16:49 ` Srinivas Kandagatla
  0 siblings, 0 replies; 2+ messages in thread
From: Srinivas Kandagatla @ 2022-04-29 16:49 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Miaoqian Lin, stable, Srinivas Kandagatla

From: Miaoqian Lin <linmq006@gmail.com>

platform_get_irq() returns non-zero IRQ number on success,
negative error number on failure.
And the doc of platform_get_irq() provides a usage example:

    int irq = platform_get_irq(pdev, 0);
    if (irq < 0)
        return irq;

Fix the check of return value to catch errors correctly.

Cc: stable@vger.kernel.org
Fixes: ad7fcbc308b0 ("slimbus: qcom: Add Qualcomm Slimbus controller driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/slimbus/qcom-ctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
index f04b961b96cd..ec58091fc948 100644
--- a/drivers/slimbus/qcom-ctrl.c
+++ b/drivers/slimbus/qcom-ctrl.c
@@ -510,9 +510,9 @@ 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;
+		return ctrl->irq;
 	}
 
 	sctrl = &ctrl->ctrl;
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-29 16:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 16:49 [PATCH 0/1] slimbus: Fixes for 5.18 Srinivas Kandagatla
2022-04-29 16:49 ` [PATCH 1/1] slimbus: qcom: Fix IRQ check in qcom_slim_probe 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.