linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xin Long <lucien.xin@gmail.com>
To: wangyunjian <wangyunjian@huawei.com>
Cc: Jakub Kicinski <kuba@kernel.org>, davem <davem@davemloft.net>,
	Vlad Yasevich <vyasevich@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	"linux-sctp @ vger . kernel . org" <linux-sctp@vger.kernel.org>,
	network dev <netdev@vger.kernel.org>,
	dingxiaoxiong@huawei.com
Subject: Re: [PATCH net-next] sctp: Remove redundant skb_list null check
Date: Fri, 30 Apr 2021 17:22:06 -0400	[thread overview]
Message-ID: <CADvbK_d85SOS51oU6-a2HKm8Ammd2y+L0qiy+k3-wb9hEUNbkQ@mail.gmail.com> (raw)
In-Reply-To: <1619691589-4776-1-git-send-email-wangyunjian@huawei.com>

On Thu, Apr 29, 2021 at 6:20 AM wangyunjian <wangyunjian@huawei.com> wrote:
>
> From: Yunjian Wang <wangyunjian@huawei.com>
>
> The skb_list cannot be NULL here since its already being accessed
> before. Remove the redundant null check.
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
>  net/sctp/ulpqueue.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
> index 407fed46931b..6f3685f0e700 100644
> --- a/net/sctp/ulpqueue.c
> +++ b/net/sctp/ulpqueue.c
> @@ -259,10 +259,7 @@ int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sk_buff_head *skb_list)
>         return 1;
>
>  out_free:
> -       if (skb_list)
> -               sctp_queue_purge_ulpevents(skb_list);
> -       else
> -               sctp_ulpevent_free(event);
> +       sctp_queue_purge_ulpevents(skb_list);
>
>         return 0;
>  }
> --
> 2.23.0
>
Reviewed-by: Xin Long <lucien.xin@gmail.com>

      parent reply	other threads:[~2021-04-30 21:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29 10:19 [PATCH net-next] sctp: Remove redundant skb_list null check wangyunjian
2021-04-30  0:45 ` Marcelo Ricardo Leitner
2021-04-30 21:22 ` Xin Long [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=CADvbK_d85SOS51oU6-a2HKm8Ammd2y+L0qiy+k3-wb9hEUNbkQ@mail.gmail.com \
    --to=lucien.xin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dingxiaoxiong@huawei.com \
    --cc=kuba@kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=vyasevich@gmail.com \
    --cc=wangyunjian@huawei.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).