]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: rtw89: debug: Fix error handling in rtw89_debug_priv_btc_manual_set()
authorZhang Shurong <zhang_shurong@foxmail.com>
Sat, 15 Jul 2023 13:42:57 +0000 (21:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:42:31 +0000 (09:42 +0200)
commit6bf4ccafb35677d110d642c82d4f0b473885260a
tree7f0c56da07b148e14a465be638c4b70f0fe1c59e
parent39a6b4bbc57362ab5fe79c989ca0e80497be3d23
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@foxmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/tencent_1C09B99BD7DA9CAD18B00C8F0F050F540607@qq.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtw89/debug.c