Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1010922pxj; Thu, 27 May 2021 17:50:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUtwIEYoiuQ1i6YrPv5oM/wGp1foWXfvYTN60XT6nR2Om+zTUpSJLNXT/NoRILreiR5i3i X-Received: by 2002:a02:5289:: with SMTP id d131mr6083913jab.121.1622163024575; Thu, 27 May 2021 17:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622163024; cv=none; d=google.com; s=arc-20160816; b=k+jVXed/OSMzck0LFTZxpEjtZzPtww0rCIkVAzuBlPB5cem22k+xxqs3AWQjOihkbr at/TDZohwO4WN5aA2DYjC0GvNUuDpoFItbZvjNzKnrFFZvh4kJa/GeT+9zxiJ1CozSjj T8FlHEcQPUpFHyY9MUjaoMIPBDDojV2yrVUYF+QrllqTONvt7Ra9z0yapUqh1KsgZE5x BwETSf8A4In9zBy4R0Aq+R+tT4VKnaLSDDv4s8E8tqG/tkQgF9qzotzfwt8pjdNB8z+D zemlK8NVMvdYAzyNNANJE9E9Rjb2S0eIPeuRLtpgdGAn4qz3B0F3cOYLruogIEiyZIaj HDjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=C2RHxl5OyIE39pTv7wq8xksEv7IhZxdj+zxeEWsCFhk=; b=0JVIAzyLcg2rErD2/f86Htimqvsbjvl6Q5wlmcy52wKfWtQD+e1OTsPQcfC7EelcH1 daiv1k+a9iz5G8wNfFKZnTVegA5PgM0MpR4om1KhyX+nHcFjExBGTEpQlTyZ7CU2a75Q IgQi38TdztSYhP5Z6s0hV/YlxwekkaCN0zzwOQ3gZy/hlPvbXGXTPogpxK01Ky3RKGVc Eeu9FbQrAj4NRrI87CeAVg0YRxt/N7gD69pS7gO6Cpj+5AFH9xdURojy+tYMVJcjR+cy DjD4qwHbVh8L0P6wCJBR0F/J3LlPjRAKEEIJfEUTSLrfykdm+8ZssjXq9BIrBj1DFLbu pGUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j5si4656609iom.105.2021.05.27.17.50.11; Thu, 27 May 2021 17:50:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235968AbhE1ASJ (ORCPT + 99 others); Thu, 27 May 2021 20:18:09 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2442 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234649AbhE1ARa (ORCPT ); Thu, 27 May 2021 20:17:30 -0400 Received: from dggeml753-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4FrlWf2TJ2z674v; Fri, 28 May 2021 08:13:02 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggeml753-chm.china.huawei.com (10.1.199.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 28 May 2021 08:15:55 +0800 Received: from localhost.localdomain (10.67.165.24) by dggemi759-chm.china.huawei.com (10.1.198.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 28 May 2021 08:15:55 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH V2 net-next 10/10] net: hdlc_fr: remove unnecessary out of memory message Date: Fri, 28 May 2021 08:12:49 +0800 Message-ID: <1622160769-6678-11-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622160769-6678-1-git-send-email-huangguangbin2@huawei.com> References: <1622160769-6678-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Li This patch removes unnecessary out of memory message, to fix the following checkpatch.pl warning: "WARNING: Possible unnecessary 'out of memory' message" Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/hdlc_fr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index de7fbdc..72250fe 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c @@ -474,10 +474,9 @@ static void fr_lmi_send(struct net_device *dev, int fullrep) } skb = dev_alloc_skb(len); - if (!skb) { - netdev_warn(dev, "Memory squeeze on fr_lmi_send()\n"); + if (!skb) return; - } + memset(skb->data, 0, len); skb_reserve(skb, 4); if (lmi == LMI_CISCO) -- 2.8.1