Commit c6477cb2 authored by Kevin Lo's avatar Kevin Lo Committed by Kalle Valo

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: default avatarKevin Lo <kevlo@kevlo.org>
Acked-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/YXEJey8lKksAZif4@ns.kevlo.org
parent 090f8a2f
...@@ -560,7 +560,7 @@ static int hfc_pub_cfg_chk(struct rtw89_dev *rtwdev) ...@@ -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; const struct rtw89_hfc_pub_cfg *pub_cfg = &param->pub_cfg;
if (pub_cfg->grp0 + pub_cfg->grp1 != pub_cfg->pub_max) if (pub_cfg->grp0 + pub_cfg->grp1 != pub_cfg->pub_max)
return 0; return -EFAULT;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment