From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Jiri Pirko <jiri@resnulli.us>, netdev@vger.kernel.org
Cc: davem@davemloft.net, jhs@mojatatu.com
Subject: Re: [patch net-next 1/2] net: sched: cls_basic: fix error path in basic_change()
Date: Fri, 05 Dec 2014 20:07:05 +0300 [thread overview]
Message-ID: <5481E639.1070408@cogentembedded.com> (raw)
In-Reply-To: <1417791023-28124-1-git-send-email-jiri@resnulli.us>
Hello.
On 12/05/2014 05:50 PM, Jiri Pirko wrote:
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Care to explain what's wrong?
> ---
> net/sched/cls_basic.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
> diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
> index 7cf0a62..5aed341 100644
> --- a/net/sched/cls_basic.c
> +++ b/net/sched/cls_basic.c
> @@ -178,10 +178,9 @@ static int basic_change(struct net *net, struct sk_buff *in_skb,
> return -EINVAL;
> }
>
> - err = -ENOBUFS;
> fnew = kzalloc(sizeof(*fnew), GFP_KERNEL);
> - if (fnew == NULL)
> - goto errout;
> + if (!fnew)
> + return -ENOBUFS;
>
> tcf_exts_init(&fnew->exts, TCA_BASIC_ACT, TCA_BASIC_POLICE);
> err = -EINVAL;
WBR, Sergei
next prev parent reply other threads:[~2014-12-05 17:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 14:50 [patch net-next 1/2] net: sched: cls_basic: fix error path in basic_change() Jiri Pirko
2014-12-05 14:50 ` [patch net-next 2/2] net: sched: cls: use nla_nest_cancel instead of nlmsg_trim Jiri Pirko
2014-12-09 20:42 ` David Miller
2014-12-09 20:48 ` David Miller
2014-12-09 21:23 ` [patch net-next v2] " Jiri Pirko
2014-12-10 2:51 ` David Miller
2014-12-05 15:29 ` [patch net-next 1/2] net: sched: cls_basic: fix error path in basic_change() John Fastabend
2014-12-05 16:03 ` Eric Dumazet
2014-12-05 16:34 ` John Fastabend
2014-12-08 7:27 ` Jiri Pirko
2014-12-05 17:07 ` Sergei Shtylyov [this message]
2014-12-09 20:42 ` David Miller
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=5481E639.1070408@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--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).