linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Kevin Lo <kevlo@kevlo.org>
Cc: linux-wireless@vger.kernel.org, Pkshih <pkshih@realtek.com>
Subject: Re: [PATCH wireless-drivers-next] rtw89: fix return value in hfc_pub_cfg_chk
Date: Wed, 27 Oct 2021 07:37:20 +0000 (UTC)	[thread overview]
Message-ID: <163532023368.30745.12468473810176045324.kvalo@codeaurora.org> (raw)
In-Reply-To: <YXEJey8lKksAZif4@ns.kevlo.org>

Kevin Lo <kevlo@kevlo.org> wrote:

> 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>
> 
> 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;
>  }

Patch applied to wireless-drivers-next.git, thanks.

c6477cb23704 rtw89: fix return value in hfc_pub_cfg_chk

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/YXEJey8lKksAZif4@ns.kevlo.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


      parent reply	other threads:[~2021-10-27  7:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21  6:32 [PATCH wireless-drivers-next] rtw89: fix return value in hfc_pub_cfg_chk Kevin Lo
2021-10-22  0:26 ` Pkshih
2021-10-27  7:37 ` Kalle Valo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=163532023368.30745.12468473810176045324.kvalo@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=kevlo@kevlo.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).