net: sched: simplify code in mall_reoffload
authorWilliam Dean <williamsukatube@163.com>
Sat, 17 Sep 2022 06:35:56 +0000 (14:35 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 Sep 2022 01:22:04 +0000 (18:22 -0700)
such expression:
if (err)
return err;
return 0;
can simplify to:
return err;

Signed-off-by: William Dean <williamsukatube@163.com>
Link: https://lore.kernel.org/r/20220917063556.2673-1-williamsukatube@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/cls_matchall.c

index 06cf22adbab732b32371cb1ca11818492a6f565e..63b99ffb7dbcaf13176ea44f7eee230ad34b1687 100644 (file)
@@ -313,10 +313,7 @@ static int mall_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb,
        tc_cleanup_offload_action(&cls_mall.rule->action);
        kfree(cls_mall.rule);
 
-       if (err)
-               return err;
-
-       return 0;
+       return err;
 }
 
 static void mall_stats_hw_filter(struct tcf_proto *tp,