From: Lijun Ou Date: Thu, 16 Jan 2020 09:27:04 +0000 (+0800) Subject: net/hns3: remove unnecessary input parameter check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b34fdfe98482cfca168be924d5d3d87dd51ae9f8;p=dpdk.git net/hns3: remove unnecessary input parameter check Since the input parameter named dev has been guaranteed not to be NULL in the rte layer of DPDK framework, it doesn't need to check dev whether is null in the 'filter_ctrl' ops implementation function named hns3_dev_filter_ctrl. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) --- diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index aa614175df..98affa5679 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1887,8 +1887,6 @@ hns3_dev_filter_ctrl(struct rte_eth_dev *dev, enum rte_filter_type filter_type, struct hns3_hw *hw; int ret = 0; - if (dev == NULL) - return -EINVAL; hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private); switch (filter_type) { case RTE_ETH_FILTER_GENERIC: