Thread (11 messages) 11 messages, 3 authors, 2023-12-05

Re: [PATCH net-next v2 3/4] net/sched: act_api: stop loop over ops array on NULL in tcf_action_init

From: Marcelo Ricardo Leitner <hidden>
Date: 2023-12-01 18:11:00

On Fri, Dec 01, 2023 at 10:05:12AM -0800, Marcelo Ricardo Leitner wrote:
On Fri, Dec 01, 2023 at 02:50:14PM -0300, Pedro Tammela wrote:
quoted
-	for (i = 0; i < TCA_ACT_MAX_PRIO; i++) {
-		if (ops[i])
-			module_put(ops[i]->owner);
-	}
+	for (i = 0; i < TCA_ACT_MAX_PRIO && ops[i]; i++)
+		module_put(ops[i]->owner);
 	return err;
Seems you thought it would have been an abuse to use
tcf_act_for_each_action() here as well, which I can understand.
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help