netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: davem@davemloft.net, kuba@kernel.org
Cc: Jia-Ju Bai <baijiaju1990@gmail.com>,
	kvalo@codeaurora.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ath: ath6kl: fix error return code of ath6kl_htc_rx_bundle()
Date: Sun, 7 Mar 2021 11:18:03 +0200	[thread overview]
Message-ID: <YESaSwoGRxGvrggv@unreal> (raw)
In-Reply-To: <20210307090757.22617-1-baijiaju1990@gmail.com>

On Sun, Mar 07, 2021 at 01:07:57AM -0800, Jia-Ju Bai wrote:
> When hif_scatter_req_get() returns NULL to scat_req, no error return
> code of ath6kl_htc_rx_bundle() is assigned.
> To fix this bug, status is assigned with -EINVAL in this case.
>
> Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
> ---
>  drivers/net/wireless/ath/ath6kl/htc_mbox.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
> index 998947ef63b6..3f8857d19a0c 100644
> --- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c
> +++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
> @@ -1944,8 +1944,10 @@ static int ath6kl_htc_rx_bundle(struct htc_target *target,
>
>  	scat_req = hif_scatter_req_get(target->dev->ar);
>
> -	if (scat_req == NULL)
> +	if (scat_req == NULL) {
> +		status = -EINVAL;

I'm not sure about it.

David. Jakub,
Please be warned that patches from this guy are not so great.
I looked on 4 patches and 3 of them were wrong (2 in RDMA and 1 for mlx5)
plus this patch most likely is incorrect too.

Thanks

>  		goto fail_rx_pkt;
> +	}
>
>  	for (i = 0; i < n_scat_pkt; i++) {
>  		int pad_len;
> --
> 2.17.1
>

  reply	other threads:[~2021-03-07  9:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07  9:07 [PATCH] ath: ath6kl: fix error return code of ath6kl_htc_rx_bundle() Jia-Ju Bai
2021-03-07  9:18 ` Leon Romanovsky [this message]
2021-03-07  9:31   ` Jia-Ju Bai
2021-03-07 10:36     ` Heiner Kallweit
2021-03-07 12:28     ` Leon Romanovsky

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=YESaSwoGRxGvrggv@unreal \
    --to=leon@kernel.org \
    --cc=baijiaju1990@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).