]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
net: hns3: remove redundant print on ENOMEM
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 21 Jan 2020 08:42:12 +0000 (16:42 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 20 Feb 2020 13:58:09 +0000 (07:58 -0600)
BugLink: https://launchpad.net/bugs/1861972
All kmalloc-based functions print enough information on failures.
So this patch removes the log in hclge_get_dfx_reg() when returns
ENOMEM.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 322cb97c0734555d7a10299954624363de370c9c)
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index 4cc5c1e6eb42da72c80a59ec0dbefc44a7b97fcd..03e9461f093e0fd72eab4d144957e8e8bc97c0f9 100644 (file)
@@ -10271,10 +10271,8 @@ static int hclge_get_dfx_reg(struct hclge_dev *hdev, void *data)
 
        buf_len = sizeof(*desc_src) * bd_num_max;
        desc_src = kzalloc(buf_len, GFP_KERNEL);
-       if (!desc_src) {
-               dev_err(&hdev->pdev->dev, "%s kzalloc failed\n", __func__);
+       if (!desc_src)
                return -ENOMEM;
-       }
 
        for (i = 0; i < dfx_reg_type_num; i++) {
                bd_num = bd_num_list[i];