aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorWilliam Dean <williamsukatube@163.com>2022-09-17 14:35:56 +0800
committerJakub Kicinski <kuba@kernel.org>2022-09-21 18:22:04 -0700
commit2801f30e2cef8144004ebede660e34c48f525d9b (patch)
tree252ceb93f8d7ccaef6366f588afe10f6057f0055 /net/sched
parentnet: ethernet: ti: am65-cpsw: remove unused parameter of am65_cpsw_nuss_common_open() (diff)
downloadlinux-dev-2801f30e2cef8144004ebede660e34c48f525d9b.tar.xz
linux-dev-2801f30e2cef8144004ebede660e34c48f525d9b.zip
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 <williamsukatube@163.com> Link: https://lore.kernel.org/r/20220917063556.2673-1-williamsukatube@163.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_matchall.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c
index 06cf22adbab7..63b99ffb7dbc 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,