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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}