summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYufeng Mo <moyufeng@huawei.com>2020-03-07 11:42:50 +0800
committerDavid S. Miller <davem@davemloft.net>2020-03-09 19:36:13 -0700
commitfbdc4d79fcc2e226a36c9b8e2f1cdd80ca549094 (patch)
tree649309fbf521cafbdcd5248d45e4e149d381d9cd /drivers
parent8de91e92070b5a083e4705cd4684c1802f7f730e (diff)
downloadlinux-fbdc4d79fcc2e226a36c9b8e2f1cdd80ca549094.tar.bz2
net: hns3: delete unnecessary logs after kzalloc fails
Since kernel already has logs after kzalloc fails, it's unnecessary to print duplicate logs. So this patch deletes these logs. Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
index 07b30f99d7cc..17228288d4df 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
@@ -145,10 +145,8 @@ static void hclge_dbg_dump_reg_common(struct hclge_dev *hdev,
buf_len = sizeof(struct hclge_desc) * bd_num;
desc_src = kzalloc(buf_len, GFP_KERNEL);
- if (!desc_src) {
- dev_err(&hdev->pdev->dev, "call kzalloc failed\n");
+ if (!desc_src)
return;
- }
desc = desc_src;
ret = hclge_dbg_cmd_send(hdev, desc, index, bd_num, reg_msg->cmd);
@@ -1082,11 +1080,8 @@ static void hclge_dbg_get_m7_stats_info(struct hclge_dev *hdev)
buf_len = sizeof(struct hclge_desc) * bd_num;
desc_src = kzalloc(buf_len, GFP_KERNEL);
- if (!desc_src) {
- dev_err(&hdev->pdev->dev,
- "allocate desc for get_m7_stats failed\n");
+ if (!desc_src)
return;
- }
desc_tmp = desc_src;
ret = hclge_dbg_cmd_send(hdev, desc_tmp, 0, bd_num,