Skip to contentSkip to conversation

net/enic: check return code

PATCH Applied John Daley 2 participants 2 messages Oct 14, 2020 Network drivers

lore
Share & tools
lore

John Daley

author
#0 lore raw

PATCH 1/1 net/enic: check return code

Coverity issue: 363046

Fixes bb66d562aefc ("net/enic: share flow actions with same signature")
---
 drivers/net/enic/enic_fm_flow.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/enic/enic_fm_flow.c +5 -1
index 96ec360a85..9cea94269c 100644
@@ -2232,7 +2232,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
 error_with_action_handle:
 	args[0] = FM_ACTION_FREE;
 	args[1] = ah->handle;
-	flowman_cmd(fm, args, 2);
+	ret = flowman_cmd(fm, args, 2);
+	if (ret != 0)
+		rte_flow_error_set(error, -ret,
+				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+				   NULL, "enic: devcmd(action-free)");
 error_with_ah:
 	free(ah);
 	return ret;
Signature · 1 line
2.26.2