The code to enable fdir filter assumes entry is present.
If not found it would return uninitialized value.
Bugzilla ID: 1964
Fixes: efa3b9b36fc7 ("net/hinic3: add flow control and filters")
Cc: [email protected]
Signed-off-by: Stephen Hemminger <[email protected]>
---
drivers/net/hinic3/hinic3_fdir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hinic3/hinic3_fdir.c b/drivers/net/hinic3/hinic3_fdir.c
index 37a4f0cf52..71d50a3d22 100644
--- a/drivers/net/hinic3/hinic3_fdir.c
+++ b/drivers/net/hinic3/hinic3_fdir.c
@@ -1275,7 +1275,7 @@ hinic3_enable_rxq_fdir_filter(struct rte_eth_dev *dev,
uint32_t queue_id, uint32
struct hinic3_nic_dev *nic_dev = HINIC3_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
struct hinic3_tcam_filter *it;
struct hinic3_tcam_cfg_rule fdir_tcam_rule;
- int ret;
+ int ret = -EINVAL;
uint32_t queue_res;
uint16_t index;
--
2.53.0