diff mbox series

[-next] net: sched: simplify code in mall_reoffload

Message ID 20220917063556.2673-1-williamsukatube@163.com (mailing list archive)
State Accepted
Commit 2801f30e2cef8144004ebede660e34c48f525d9b
Delegated to: Netdev Maintainers
Headers show
Series [-next] net: sched: simplify code in mall_reoffload | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

williamsukatube@163.com Sept. 17, 2022, 6:35 a.m. UTC
From: William Dean <williamsukatube@163.com>

such expression:
	if (err)
		return err;
	return 0;
can simplify to:
	return err;

Signed-off-by: William Dean <williamsukatube@163.com>
---
 net/sched/cls_matchall.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--
2.25.1

Comments

patchwork-bot+netdevbpf@kernel.org Sept. 22, 2022, 1:30 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Sat, 17 Sep 2022 14:35:56 +0800 you wrote:
> From: William Dean <williamsukatube@163.com>
> 
> such expression:
> 	if (err)
> 		return err;
> 	return 0;
> can simplify to:
> 	return err;
> 
> [...]

Here is the summary with links:
  - [-next] net: sched: simplify code in mall_reoffload
    https://git.kernel.org/netdev/net-next/c/2801f30e2cef

You are awesome, thank you!
diff mbox series

Patch

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,