netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next 1/2] net: sched: cls_basic: fix error path in basic_change()
@ 2014-12-05 14:50 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
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Jiri Pirko @ 2014-12-05 14:50 UTC (permalink / raw)
  To: netdev; +Cc: davem, jhs

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 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;
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-12-10  2:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-12-09 20:42 ` David Miller

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).