Patch "wifi: rtw89: debug: Fix error handling in rtw89_debug_priv_btc_manual_set()" has been added to the 6.1-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: rtw89: debug: Fix error handling in rtw89_debug_priv_btc_manual_set()

to the 6.1-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-rtw89-debug-fix-error-handling-in-rtw89_debug_p.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 7bc2faf1167fa60083b85151e1cd7ab255f2d3f6
Author: Zhang Shurong <zhang_shurong@xxxxxxxxxxx>
Date:   Sat Jul 15 21:42:57 2023 +0800

    wifi: rtw89: debug: Fix error handling in rtw89_debug_priv_btc_manual_set()
    
    [ Upstream commit 59b4cc439f184c5eaa34161ec67af1e16ffabed4 ]
    
    If there is a failure during kstrtobool_from_user()
    rtw89_debug_priv_btc_manual_set should return a negative error code
    instead of returning the count directly.
    
    Fix this bug by returning an error code instead of a count after
    a failed call of the function "kstrtobool_from_user". Moreover
    I omitted the label "out" with this source code correction.
    
    Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver")
    Signed-off-by: Zhang Shurong <zhang_shurong@xxxxxxxxxxx>
    Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/tencent_1C09B99BD7DA9CAD18B00C8F0F050F540607@xxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c
index ec0af903961f0..3a8fe60d0bb7b 100644
--- a/drivers/net/wireless/realtek/rtw89/debug.c
+++ b/drivers/net/wireless/realtek/rtw89/debug.c
@@ -2302,12 +2302,14 @@ static ssize_t rtw89_debug_priv_btc_manual_set(struct file *filp,
 	struct rtw89_dev *rtwdev = debugfs_priv->rtwdev;
 	struct rtw89_btc *btc = &rtwdev->btc;
 	bool btc_manual;
+	int ret;
 
-	if (kstrtobool_from_user(user_buf, count, &btc_manual))
-		goto out;
+	ret = kstrtobool_from_user(user_buf, count, &btc_manual);
+	if (ret)
+		return ret;
 
 	btc->ctrl.manual = btc_manual;
-out:
+
 	return count;
 }
 



[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