archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <>
To: Simon Horman <>,
	Louis Peens <>
Cc: Jakub Kicinski <>,
	"David S. Miller" <>,
	Yinjun Zhang <>,,,
Subject: [PATCH net-next] nfp: flower-ct: check for error in nfp_fl_ct_offload_nft_flow()
Date: Sat, 19 Jun 2021 16:53:26 +0300	[thread overview]
Message-ID: <YM321r7Enw8sGj0X@mwanda> (raw)

The nfp_fl_ct_add_flow() function can fail so we need to check for

Fixes: 95255017e0a8 ("nfp: flower-ct: add nft flows to nft list")
Signed-off-by: Dan Carpenter <>
 drivers/net/ethernet/netronome/nfp/flower/conntrack.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c
index 9ea77bb3b69c..273d529d43c2 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c
@@ -1067,6 +1067,8 @@ nfp_fl_ct_offload_nft_flow(struct nfp_fl_ct_zone_entry *zt, struct flow_cls_offl
 		if (!ct_map_ent) {
 			ct_entry = nfp_fl_ct_add_flow(zt, NULL, flow, true, extack);
+			if (IS_ERR(ct_entry))
+				return PTR_ERR(ct_entry);
 			ct_entry->type = CT_TYPE_NFT;
 			list_add(&ct_entry->list_node, &zt->nft_flows_list);

             reply	other threads:[~2021-06-19 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-19 13:53 Dan Carpenter [this message]
2021-06-21  5:15 ` [PATCH net-next] nfp: flower-ct: check for error in nfp_fl_ct_offload_nft_flow() Louis Peens
2021-06-21  9:22   ` Simon Horman
2021-06-21 19:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YM321r7Enw8sGj0X@mwanda \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).