From: cgel.zte@gmail.com
To: davem@davemloft.net
Cc: kuba@kernel.org, pablo@netfilter.org, contact@proelbtn.com,
justin.iurman@uliege.be, chi.minghao@zte.com.cn,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Zeal Robot <zealci@zte.com.cm>
Subject: [PATCH core-next] net/core: remove unneeded variable
Date: Fri, 10 Dec 2021 02:20:12 +0000 [thread overview]
Message-ID: <20211210022012.423994-1-chi.minghao@zte.com.cn> (raw)
From: Minghao Chi <chi.minghao@zte.com.cn>
Return status directly from function called.
Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
net/core/lwtunnel.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/core/lwtunnel.c b/net/core/lwtunnel.c
index 2820aca2173a..c34248e358ac 100644
--- a/net/core/lwtunnel.c
+++ b/net/core/lwtunnel.c
@@ -63,11 +63,7 @@ static const char *lwtunnel_encap_str(enum lwtunnel_encap_types encap_type)
struct lwtunnel_state *lwtunnel_state_alloc(int encap_len)
{
- struct lwtunnel_state *lws;
-
- lws = kzalloc(sizeof(*lws) + encap_len, GFP_ATOMIC);
-
- return lws;
+ return kzalloc(sizeof(*lws) + encap_len, GFP_ATOMIC);
}
EXPORT_SYMBOL_GPL(lwtunnel_state_alloc);
--
2.25.1
next reply other threads:[~2021-12-10 2:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 2:20 cgel.zte [this message]
2021-12-10 2:50 ` [PATCH core-next] net/core: remove unneeded variable Jakub Kicinski
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=20211210022012.423994-1-chi.minghao@zte.com.cn \
--to=cgel.zte@gmail.com \
--cc=chi.minghao@zte.com.cn \
--cc=contact@proelbtn.com \
--cc=davem@davemloft.net \
--cc=justin.iurman@uliege.be \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=zealci@zte.com.cm \
/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