Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5434083pxj; Wed, 26 May 2021 10:22:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+sb8SoOGDnTaFA+poGC1Jc7NpMR0ONlzZrEiqwD6bzsQ1j0jIV+IU1razB4r0vOcdOO75 X-Received: by 2002:a02:c98a:: with SMTP id b10mr4232123jap.103.1622049773823; Wed, 26 May 2021 10:22:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622049773; cv=none; d=google.com; s=arc-20160816; b=E09z9gXVFnkmzvS2xBfVKc0TN820b080s/14L+HiJ0DL/Gcr5RX4INXpnKjwUurCC+ SHjUBMfTdg/Hg3OXCjukYsqnfbk99oji0vKRTzS9liyGGId1yJF+/vftuwUsctH7lfap hmrulPfn14HNgRQ6DlTUl6QRJF0a7XEPa/UGOzNUTA+Udhi89+2mBC7FXHJo0ZsQTbA1 RWdaibk4InRrFIdDJaYzzDuRnBf6Wm9Khhmiu/TIJBdi9PjkRkHRVErMGbup9Rw9JgLp iJdha/Ofm3V2QrVHeYOKBwN+HmuSOqpT6Oj0Vp2ds5VtKNjmyujLp+aa731sc1TL7Tz6 +N4g== 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=sgOiIcSVizHlYj1fgF/Cz+vz4fLifJUZeK0OiffHHUo=; b=gIhPYvlZZLMZ0DsVxiDe+Dad/GlIKE4FoC8t4OLacsCYAWzDRQswv/mX1gYEKfGdLM //g+t/y1c3SmJiZrcmzbYZYBWCZC/aViqppsKN/Le8mjrwIVm3Ihro/LKCmsvIdXPDmX B7dyBw3HacgeK3ISzEirzx0yit1z4OT0vZrDTaoMGrvcg65DdTM1iIKUDmqDd3OK22Nd 7txeKe4qP78HJtiN36UjW8j74SuGL81BZXEQLCO7mH44/bpdTYTE9OTaQ3ZxAEwLnkeb lW9AwvsnRjpR5YmOekNr9DRawa8ChQovYOpY8jlyrZ++RVxENcmptcrbyXYNpDAUb4OP NGIg== 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 l21si18957837iow.25.2021.05.26.10.22.30; Wed, 26 May 2021 10:22:53 -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 S234520AbhEZLu1 (ORCPT + 99 others); Wed, 26 May 2021 07:50:27 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6715 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229870AbhEZLta (ORCPT ); Wed, 26 May 2021 07:49:30 -0400 Received: from dggems706-chm.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FqpyD4443znccB; Wed, 26 May 2021 19:44:20 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggems706-chm.china.huawei.com (10.3.19.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Wed, 26 May 2021 19:47:57 +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; Wed, 26 May 2021 19:47:57 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 10/10] net: wan: remove unnecessary out of memory message Date: Wed, 26 May 2021 19:44:55 +0800 Message-ID: <1622029495-30357-11-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622029495-30357-1-git-send-email-huangguangbin2@huawei.com> References: <1622029495-30357-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) 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 de7fbdc77588..72250fe0a1df 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