From: William Dean Date: Sat, 17 Sep 2022 06:35:56 +0000 (+0800) Subject: net: sched: simplify code in mall_reoffload X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2801f30e2cef8144004ebede660e34c48f525d9b;p=linux.git net: sched: simplify code in mall_reoffload such expression: if (err) return err; return 0; can simplify to: return err; Signed-off-by: William Dean Link: https://lore.kernel.org/r/20220917063556.2673-1-williamsukatube@163.com Signed-off-by: Jakub Kicinski --- diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c index 06cf22adbab73..63b99ffb7dbca 100644 --- a/net/sched/cls_matchall.c +++ b/net/sched/cls_matchall.c @@ -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,