mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Huazhong Tan <tanhuazhong@huawei.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
	<huangdaode@huawei.com>, <linuxarm@huawei.com>, <kuba@kernel.org>,
	Huazhong Tan <tanhuazhong@huawei.com>
Subject: [PATCH net-next 8/9] net: hns3: remove redundant print on ENOMEM
Date: Tue, 21 Jan 2020 16:42:12 +0800	[thread overview]
Message-ID: <1579596133-54842-9-git-send-email-tanhuazhong@huawei.com> (raw)
In-Reply-To: <1579596133-54842-1-git-send-email-tanhuazhong@huawei.com>

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>
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 07fded7..fafae67 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -10318,10 +10318,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];
-- 
2.7.4


  parent reply	other threads:[~2020-01-21  8:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21  8:42 [PATCH net-next 0/9] net: hns3: misc updates for -net-next Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 1/9] net: hns3: limit the error logging in the hns3_clean_tx_ring() Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 2/9] net: hns3: do not reuse pfmemalloc pages Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 3/9] net: hns3: set VF's default reset_type to HNAE3_NONE_RESET Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 4/9] net: hns3: move duplicated macro definition into header Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 5/9] net: hns3: refine the input parameter 'size' for snprintf() Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 6/9] net: hns3: rewrite a log in hclge_put_vector() Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 7/9] net: hns3: delete unnecessary blank line and space for cleanup Huazhong Tan
2020-01-21  8:42 ` Huazhong Tan [this message]
2020-01-21  8:42 ` [PATCH net-next 9/9] net: hns3: cleanup some coding style issue Huazhong Tan
2020-01-21 10:46 ` [PATCH net-next 0/9] net: hns3: misc updates for -net-next David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1579596133-54842-9-git-send-email-tanhuazhong@huawei.com \
    --to=tanhuazhong@huawei.com \
    --cc=davem@davemloft.net \
    --cc=huangdaode@huawei.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®