lkml.org 
[lkml]   [2021]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH core-next] net/core: remove unneeded variable
On Fri, 10 Dec 2021 02:20:12 +0000 cgel.zte@gmail.com wrote:
> 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);

I don't think any of your "remove unneeded variable" patches are worth
applying, sorry.

This one doesn't even build.

\
 
 \ /
  Last update: 2021-12-10 03:51    [W:2.827 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site