aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek
diff options
context:
space:
mode:
authorKevin Lo <kevlo@kevlo.org>2021-10-21 14:32:27 +0800
committerKalle Valo <kvalo@codeaurora.org>2021-10-27 10:37:01 +0300
commitc6477cb237048725922f6a786f68b5232abb418f (patch)
tree8507c15a3f57382760710792cad9678766d8e426 /drivers/net/wireless/realtek
parentrtw89: remove duplicate register definitions (diff)
downloadlinux-dev-c6477cb237048725922f6a786f68b5232abb418f.tar.xz
linux-dev-c6477cb237048725922f6a786f68b5232abb418f.zip
rtw89: fix return value in hfc_pub_cfg_chk
It seems to me when pub_cfg->grp0 + pub_cfg->grp1 != pub_cfg->pub_max is true, it should return -EFAULT rather than 0. Otherwise, the function doesn't need to exist. Signed-off-by: Kevin Lo <kevlo@kevlo.org> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/YXEJey8lKksAZif4@ns.kevlo.org
Diffstat (limited to 'drivers/net/wireless/realtek')
-rw-r--r--drivers/net/wireless/realtek/rtw89/mac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
index 69384c43c046..afcd07ab1de7 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.c
+++ b/drivers/net/wireless/realtek/rtw89/mac.c
@@ -560,7 +560,7 @@ static int hfc_pub_cfg_chk(struct rtw89_dev *rtwdev)
const struct rtw89_hfc_pub_cfg *pub_cfg = &param->pub_cfg;
if (pub_cfg->grp0 + pub_cfg->grp1 != pub_cfg->pub_max)
- return 0;
+ return -EFAULT;
return 0;
}