Commit fb073904 authored by Pedro Tammela's avatar Pedro Tammela Committed by David S. Miller
Browse files

net/sched: act_connmark: handle errno on tcf_idr_check_alloc



Smatch reports that 'ci' can be used uninitialized.
The current code ignores errno coming from tcf_idr_check_alloc, which
will lead to the incorrect usage of 'ci'. Handle the errno as it should.

Fixes: 288864ef ("net/sched: act_connmark: transition to percpu stats and rcu")
Reviewed-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarPedro Tammela <pctammela@mojatatu.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 880ce5f2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -158,6 +158,9 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla,
		nparms->zone = parm->zone;

		ret = 0;
	} else {
		err = ret;
		goto out_free;
	}

	err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack);