提交 8de8e84f 编写于 作者: S shenhao 提交者: Yang Yingliang

net: hns3: delete unnecessary logs after kzalloc fails

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

--------------------------------------------

Since kernel already has logs after kzalloc fails,
it's unnecessary to print duplicate logs. So this
patch deletes these logs.
Signed-off-by: NYufeng Mo <moyufeng@huawei.com>
Signed-off-by: Nshenhao <shenhao21@huawei.com>
Reviewed-by: NZhong Zhaohui <zhongzhaohui@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 637225ad
......@@ -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);
......@@ -845,10 +843,8 @@ static void hclge_dbg_dump_mac_table(struct hclge_dev *hdev)
len = sizeof(struct hclge_mac_vlan_idx_rd_mc) * HCLGE_DBG_MAC_TBL_MAX;
mc_mac_tbl = kzalloc(len, GFP_KERNEL);
if (!mc_mac_tbl) {
dev_err(&hdev->pdev->dev, "mc_mac_tbl alloc memory failed\n");
if (!mc_mac_tbl)
return;
}
memset(printf_buf, 0, HCLGE_DBG_BUF_LEN);
dev_info(&hdev->pdev->dev, "Unicast tab:\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册