Commit fbdc4d79 authored by Yufeng Mo's avatar Yufeng Mo Committed by David S. Miller

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: default avatarYufeng Mo <moyufeng@huawei.com>
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8de91e92
...@@ -145,10 +145,8 @@ static void hclge_dbg_dump_reg_common(struct hclge_dev *hdev, ...@@ -145,10 +145,8 @@ static void hclge_dbg_dump_reg_common(struct hclge_dev *hdev,
buf_len = sizeof(struct hclge_desc) * bd_num; buf_len = sizeof(struct hclge_desc) * bd_num;
desc_src = kzalloc(buf_len, GFP_KERNEL); desc_src = kzalloc(buf_len, GFP_KERNEL);
if (!desc_src) { if (!desc_src)
dev_err(&hdev->pdev->dev, "call kzalloc failed\n");
return; return;
}
desc = desc_src; desc = desc_src;
ret = hclge_dbg_cmd_send(hdev, desc, index, bd_num, reg_msg->cmd); 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) ...@@ -1082,11 +1080,8 @@ static void hclge_dbg_get_m7_stats_info(struct hclge_dev *hdev)
buf_len = sizeof(struct hclge_desc) * bd_num; buf_len = sizeof(struct hclge_desc) * bd_num;
desc_src = kzalloc(buf_len, GFP_KERNEL); desc_src = kzalloc(buf_len, GFP_KERNEL);
if (!desc_src) { if (!desc_src)
dev_err(&hdev->pdev->dev,
"allocate desc for get_m7_stats failed\n");
return; return;
}
desc_tmp = desc_src; desc_tmp = desc_src;
ret = hclge_dbg_cmd_send(hdev, desc_tmp, 0, bd_num, ret = hclge_dbg_cmd_send(hdev, desc_tmp, 0, bd_num,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment