Patch "i2c: xiic: Correct return value check for xiic_reinit()" has been added to the 6.5-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: xiic: Correct return value check for xiic_reinit()

to the 6.5-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-xiic-correct-return-value-check-for-xiic_reinit.patch
and it can be found in the queue-6.5 subdirectory.

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



commit 887d99ee315a34241d52c3d12517f87537a1bef9
Author: Daniel Scally <dan.scally@xxxxxxxxxxxxxxxx>
Date:   Wed Sep 20 14:41:09 2023 +0100

    i2c: xiic: Correct return value check for xiic_reinit()
    
    [ Upstream commit 59851fb05d759f13662be143eff0aae605815b0e ]
    
    The error paths for xiic_reinit() return negative values on failure
    and 0 on success - this error message therefore is triggered on
    _success_ rather than failure. Correct the condition so it's only
    shown on failure as intended.
    
    Fixes: 8fa9c9388053 ("i2c: xiic: return value of xiic_reinit")
    Signed-off-by: Daniel Scally <dan.scally@xxxxxxxxxxxxxxxx>
    Acked-by: Michal Simek <michal.simek@xxxxxxx>
    Reviewed-by: Andi Shyti <andi.shyti@xxxxxxxxxx>
    Signed-off-by: Wolfram Sang <wsa@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index b3bb97762c859..71391b590adae 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -710,7 +710,7 @@ static irqreturn_t xiic_process(int irq, void *dev_id)
 		 * reset the IP instead of just flush fifos
 		 */
 		ret = xiic_reinit(i2c);
-		if (!ret)
+		if (ret < 0)
 			dev_dbg(i2c->adap.dev.parent, "reinit failed\n");
 
 		if (i2c->rx_msg) {



[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