OSDN Git Service

net: hns3: remove a duplicated printing in hclge_configure()
authorHuazhong Tan <tanhuazhong@huawei.com>
Thu, 14 May 2020 12:41:23 +0000 (20:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 May 2020 20:18:09 +0000 (13:18 -0700)
Since hclge_get_cfg() already has error print, so hclge_configure()
should not print error when calling hclge_get_cfg() fail.

Reported-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index 1ff896a..b796d3f 100644 (file)
@@ -1363,10 +1363,8 @@ static int hclge_configure(struct hclge_dev *hdev)
        int ret;
 
        ret = hclge_get_cfg(hdev, &cfg);
-       if (ret) {
-               dev_err(&hdev->pdev->dev, "get mac mode error %d.\n", ret);
+       if (ret)
                return ret;
-       }
 
        hdev->num_vmdq_vport = cfg.vmdq_vport_num;
        hdev->base_tqp_pid = 0;