Patch "wifi: airo: avoid uninitialized warning in airo_get_rate()" has been added to the 5.15-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

    wifi: airo: avoid uninitialized warning in airo_get_rate()

to the 5.15-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:
     wifi-airo-avoid-uninitialized-warning-in-airo_get_ra.patch
and it can be found in the queue-5.15 subdirectory.

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



commit f6e504ab4ef0b23e302e77eabce8b8a229925637
Author: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Date:   Sun Jul 9 06:31:54 2023 -0700

    wifi: airo: avoid uninitialized warning in airo_get_rate()
    
    [ Upstream commit 9373771aaed17f5c2c38485f785568abe3a9f8c1 ]
    
    Quieten a gcc (11.3.0) build error or warning by checking the function
    call status and returning -EBUSY if the function call failed.
    This is similar to what several other wireless drivers do for the
    SIOCGIWRATE ioctl call when there is a locking problem.
    
    drivers/net/wireless/cisco/airo.c: error: 'status_rid.currentXmitRate' is used uninitialized [-Werror=uninitialized]
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
    Reported-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/39abf2c7-24a-f167-91da-ed4c5435d1c4@xxxxxxxxxxxxxx
    Link: https://lore.kernel.org/r/20230709133154.26206-1-rdunlap@xxxxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c
index fc19ecbc4c088..bcbf197fa9372 100644
--- a/drivers/net/wireless/cisco/airo.c
+++ b/drivers/net/wireless/cisco/airo.c
@@ -6147,8 +6147,11 @@ static int airo_get_rate(struct net_device *dev,
 {
 	struct airo_info *local = dev->ml_priv;
 	StatusRid status_rid;		/* Card status info */
+	int ret;
 
-	readStatusRid(local, &status_rid, 1);
+	ret = readStatusRid(local, &status_rid, 1);
+	if (ret)
+		return -EBUSY;
 
 	vwrq->value = le16_to_cpu(status_rid.currentXmitRate) * 500000;
 	/* If more than one rate, set auto */



[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