Patch "ieee802154/adf7242: check status of adf7242_read_reg" has been added to the 4.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

    ieee802154/adf7242: check status of adf7242_read_reg

to the 4.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:
     ieee802154-adf7242-check-status-of-adf7242_read_reg.patch
and it can be found in the queue-4.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 7169e4e2af2b9f956dcab8267b9984161e91bf7f
Author: Tom Rix <trix@xxxxxxxxxx>
Date:   Sun Aug 2 07:23:39 2020 -0700

    ieee802154/adf7242: check status of adf7242_read_reg
    
    [ Upstream commit e3914ed6cf44bfe1f169e26241f8314556fd1ac1 ]
    
    Clang static analysis reports this error
    
    adf7242.c:887:6: warning: Assigned value is garbage or undefined
            len = len_u8;
                ^ ~~~~~~
    
    len_u8 is set in
           adf7242_read_reg(lp, 0, &len_u8);
    
    When this call fails, len_u8 is not set.
    
    So check the return code.
    
    Fixes: 7302b9d90117 ("ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154")
    
    Signed-off-by: Tom Rix <trix@xxxxxxxxxx>
    Acked-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20200802142339.21091-1-trix@xxxxxxxxxx
    Signed-off-by: Stefan Schmidt <stefan@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ieee802154/adf7242.c b/drivers/net/ieee802154/adf7242.c
index 1b980f12663af..a605dfb15bb75 100644
--- a/drivers/net/ieee802154/adf7242.c
+++ b/drivers/net/ieee802154/adf7242.c
@@ -834,7 +834,9 @@ static int adf7242_rx(struct adf7242_local *lp)
 	int ret;
 	u8 lqi, len_u8, *data;
 
-	adf7242_read_reg(lp, 0, &len_u8);
+	ret = adf7242_read_reg(lp, 0, &len_u8);
+	if (ret)
+		return ret;
 
 	len = len_u8;
 



[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