@@ -332,7 +332,7 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base,
332332 struct tcindex_filter_result * r , struct nlattr * * tb ,
333333 struct nlattr * est , u32 flags , struct netlink_ext_ack * extack )
334334{
335- struct tcindex_filter_result new_filter_result , * old_r = r ;
335+ struct tcindex_filter_result new_filter_result ;
336336 struct tcindex_data * cp = NULL , * oldp ;
337337 struct tcindex_filter * f = NULL ; /* make gcc behave */
338338 struct tcf_result cr = {};
@@ -401,7 +401,7 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base,
401401 err = tcindex_filter_result_init (& new_filter_result , cp , net );
402402 if (err < 0 )
403403 goto errout_alloc ;
404- if (old_r )
404+ if (r )
405405 cr = r -> res ;
406406
407407 err = - EBUSY ;
@@ -478,14 +478,6 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base,
478478 tcf_bind_filter (tp , & cr , base );
479479 }
480480
481- if (old_r && old_r != r ) {
482- err = tcindex_filter_result_init (old_r , cp , net );
483- if (err < 0 ) {
484- kfree (f );
485- goto errout_alloc ;
486- }
487- }
488-
489481 oldp = p ;
490482 r -> res = cr ;
491483 tcf_exts_change (& r -> exts , & e );
0 commit comments