Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754621AbeAGUKw (ORCPT + 1 other); Sun, 7 Jan 2018 15:10:52 -0500 Received: from mout.web.de ([212.227.15.14]:49781 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754497AbeAGUKu (ORCPT ); Sun, 7 Jan 2018 15:10:50 -0500 To: devel@linuxdriverproject.org, netdev@vger.kernel.org, Haiyang Zhang , "K. Y. Srinivasan" , Stephen Hemminger Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] hyperv/netvsc: Delete two error messages for a failed memory allocation in netvsc_init_buf() Message-ID: Date: Sun, 7 Jan 2018 21:10:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Dnq3NqdRjfxI/K1HQkMC/QbA8tbPlMajquB9NHIvOu8/hm6K8SK vaaJW876tUsM+UTQ66QhjO6wWCdCFSEEsZ97tVfD7pFdGyt29YRPRMOzZekQ/yWhtk4QC0g FtQjnBfzrfkDEGKHkF/LxRqFhmQ/8sOpXn6xsdn3AtNn5vdvBgpqYvvs7/ySAak02oBJFwX PjXwvn0/go1AlvEPPC/cg== X-UI-Out-Filterresults: notjunk:1;V01:K0:6F/UkomkQvE=:9HjUTkkU7tGcoagYTYGEZQ DTRUZtiElw3bAJXl4bJ4Zp2jotg5GlFAxgQ+IZSH4zLBjrIfK7hdpjf1n32jbW6R/SwajbCqH SNdc3ipido8rdOe2p1qgAZ4UglNGt7p8uJh7mONcQC8kOvVcV95zON58Z/O1ABqj9c/iLc0hD 4wGvmZ4y/yeE4A/qnNUb0FcrQaV1ucO0aUgbFQadmjw2hTyXgv97LtpjycTDjTxX5to7F8NJ+ cK4ajKXsvYr6XLy+j7ve/B09QOIR4qgewBXe1WMWVVwAia+Hp72LMqxLVe49RP14IYSbbEfVj mcEo8R3q7aYMLdvLvfZ//WWpzb5UcAmZk1wobKomAB4zmZDxHyGFlle7efcYHZl86OG+yAAvz i1lKehIxXdBUqWTk9F6LfZq4O7Pgn+yu43vmSz+CEDDL0kpV4BZmdQQuKR2pb0aGSwZkXa8sm uAYFI5Vl3qxqE3W+vW0+ybmRqpYn52fJw1KtnfMetKwwB3X2ZqZCcukUqV9t1vG4VxFeDYvT8 7LFSNp4nFPeh22qMubwOvgaD2+hakfT9dW9oB3D4SLq3PF6soHxGE8SgndoURvzn2jDDzvY6x M4fYgIlRM1PAEtFaTl165v0pj+MwLseLleYaHkCAbZcjnzsWLC4kl093wAKYYYk+PO5squFd9 +UR8ZTdnhrG7lO67rljPNMJXQVdGhQz5amzsKSliqbYUsxRinu9K3zjAw5ND2MsyKULy4oWRL O2gfvOFi2WfF6xRUMZOzoWIhbcSPSNf06QWP6MgW8h5MtaJOG0wxoixP5ekroUMhrgc9/0htk F25Qwa7aGzINSuFlhnG1AWBCPML1XE7V2ahhZ6BMCt4Omy77TM= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Sun, 7 Jan 2018 21:03:26 +0100 Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/hyperv/netvsc.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 17e529af79dc..c1ec02f801f6 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -275,9 +275,6 @@ static int netvsc_init_buf(struct hv_device *device, net_device->recv_buf = vzalloc(buf_size); if (!net_device->recv_buf) { - netdev_err(ndev, - "unable to allocate receive buffer of size %u\n", - buf_size); ret = -ENOMEM; goto cleanup; } @@ -357,8 +354,6 @@ static int netvsc_init_buf(struct hv_device *device, net_device->send_buf = vzalloc(buf_size); if (!net_device->send_buf) { - netdev_err(ndev, "unable to allocate send buffer of size %u\n", - buf_size); ret = -ENOMEM; goto cleanup; } -- 2.15.1