Patch "i2c: sh7760: add IRQ check" has been added to the 5.10-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

    i2c: sh7760: add IRQ check

to the 5.10-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:
     i2c-sh7760-add-irq-check.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 16ecb795ae46423134fa546d7d4d8124904179de
Author: Sergey Shtylyov <s.shtylyov@xxxxxxxxxxxx>
Date:   Sat Apr 10 23:25:10 2021 +0300

    i2c: sh7760: add IRQ check
    
    [ Upstream commit e5b2e3e742015dd2aa6bc7bcef2cb59b2de1221c ]
    
    The driver neglects to check the result of platform_get_irq()'s call and
    blithely passes the negative error codes to devm_request_irq() (which
    takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding
    an original error code.  Stop calling devm_request_irq() with invalid
    IRQ #s.
    
    Fixes: a26c20b1fa6d ("i2c: Renesas SH7760 I2C master driver")
    Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxxxxxxxx>
    Signed-off-by: Wolfram Sang <wsa@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c
index c2005c789d2b..c79c9f542c5a 100644
--- a/drivers/i2c/busses/i2c-sh7760.c
+++ b/drivers/i2c/busses/i2c-sh7760.c
@@ -471,7 +471,10 @@ static int sh7760_i2c_probe(struct platform_device *pdev)
 		goto out2;
 	}
 
-	id->irq = platform_get_irq(pdev, 0);
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
+		return ret;
+	id->irq = ret;
 
 	id->adap.nr = pdev->id;
 	id->adap.algo = &sh7760_i2c_algo;



[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