net/hnic3: fix possible uninitialized return value
PATCH 1/1 net/hnic3: fix possible uninitialized return value
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")
Signed-off-by Stephen Hemminger <[email protected]>
--- drivers/net/hinic3/hinic3_fdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hinic3/hinic3_fdir.c +1 -1
@@ -1275,7 +1275,7 @@ hinic3_enable_rxq_fdir_filter(struct rte_eth_dev *dev, uint32_t queue_id, uint32struct 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;
Signature · 1 line
2.53.0