From: Guangbin Huang huangguangbin2@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
This patch deletes unnecessary INITED state judgement in hns3_get_stats() function.
Signed-off-by: Guangbin Huang huangguangbin2@huawei.com Reviewed-by: Peng Li lipeng321@huawei.com Reviewed-by: Zhong Zhaohui zhongzhaohui@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index 71d3fb6..a75879e 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -509,11 +509,9 @@ static void hns3_get_stats(struct net_device *netdev, struct ethtool_stats *stats, u64 *data) { struct hnae3_handle *h = hns3_get_handle(netdev); - struct hns3_nic_priv *priv = h->priv; u64 *p = data;
- if (!test_bit(HNS3_NIC_STATE_INITED, &priv->state) || - hns3_nic_resetting(netdev)) { + if (hns3_nic_resetting(netdev)) { netdev_err(netdev, "dev resetting, could not get stats\n"); return; }