From b05e39e0b2901fc2f9efc3f72b429e2b5fc4d6c8 Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Sun, 20 Mar 2022 13:11:00 +0300 Subject: [PATCH] net/sfc: drop futile null check The NULL pointer check is clearly unneeded. Signed-off-by: Ivan Malov Reviewed-by: Andrew Rybchenko --- drivers/net/sfc/sfc_mae.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c index b34c9afd5b..f9b0a60528 100644 --- a/drivers/net/sfc/sfc_mae.c +++ b/drivers/net/sfc/sfc_mae.c @@ -1209,18 +1209,12 @@ void sfc_mae_flow_cleanup(struct sfc_adapter *sa, struct rte_flow *flow) { - struct sfc_flow_spec *spec; struct sfc_flow_spec_mae *spec_mae; if (flow == NULL) return; - spec = &flow->spec; - - if (spec == NULL) - return; - - spec_mae = &spec->mae; + spec_mae = &flow->spec.mae; if (spec_mae->ft != NULL) { if (spec_mae->ft_rule_type == SFC_FT_RULE_JUMP) -- 2.39.5