DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/sfc: drop futile null check
@ 2022-03-20 10:11 Ivan Malov
  2022-04-06  9:00 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Malov @ 2022-03-20 10:11 UTC (permalink / raw)
  To: dev; +Cc: Andy Moreton, Andrew Rybchenko

The NULL pointer check is clearly unneeded.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 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.30.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-06  9:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-20 10:11 [PATCH] net/sfc: drop futile null check Ivan Malov
2022-04-06  9:00 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).