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: 288864effe ("net/sched: act_connmark: transition to percpu stats and rcu")
Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Pedro Tammela 2023-02-27 12:23:52 -03:00 committed by David S. Miller
parent 880ce5f200
commit fb07390463

View file

@ -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);