Patch "Input: sun4i-ps2 - fix handling of platform_get_irq() error" has been added to the 5.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Input: sun4i-ps2 - fix handling of platform_get_irq() error

to the 5.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     input-sun4i-ps2-fix-handling-of-platform_get_irq-err.patch
and it can be found in the queue-5.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 90d805458953942c47370cab92ee77f6f50a0da5
Author: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Date:   Tue Sep 15 17:56:40 2020 -0700

    Input: sun4i-ps2 - fix handling of platform_get_irq() error
    
    [ Upstream commit cafb3abea6136e59ea534004e5773361e196bb94 ]
    
    platform_get_irq() returns -ERRNO on error.  In such case comparison
    to 0 would pass the check.
    
    Fixes: e443631d20f5 ("Input: serio - add support for Alwinner A10/A20 PS/2 controller")
    Signed-off-by: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
    Acked-by: Chen-Yu Tsai <wens@xxxxxxxx>
    Link: https://lore.kernel.org/r/20200828145744.3636-4-krzk@xxxxxxxxxx
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/input/serio/sun4i-ps2.c b/drivers/input/serio/sun4i-ps2.c
index a681a2c04e399..f15ed3dcdb9b2 100644
--- a/drivers/input/serio/sun4i-ps2.c
+++ b/drivers/input/serio/sun4i-ps2.c
@@ -211,7 +211,6 @@ static int sun4i_ps2_probe(struct platform_device *pdev)
 	struct sun4i_ps2data *drvdata;
 	struct serio *serio;
 	struct device *dev = &pdev->dev;
-	unsigned int irq;
 	int error;
 
 	drvdata = kzalloc(sizeof(struct sun4i_ps2data), GFP_KERNEL);
@@ -264,14 +263,12 @@ static int sun4i_ps2_probe(struct platform_device *pdev)
 	writel(0, drvdata->reg_base + PS2_REG_GCTL);
 
 	/* Get IRQ for the device */
-	irq = platform_get_irq(pdev, 0);
-	if (!irq) {
-		dev_err(dev, "no IRQ found\n");
-		error = -ENXIO;
+	drvdata->irq = platform_get_irq(pdev, 0);
+	if (drvdata->irq < 0) {
+		error = drvdata->irq;
 		goto err_disable_clk;
 	}
 
-	drvdata->irq = irq;
 	drvdata->serio = serio;
 	drvdata->dev = dev;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux