Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp298771pxj; Wed, 16 Jun 2021 02:39:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYgX6LJ0iI0HhYXiQPbEBH37Vm4YJsyEl8bsCMja8nR/R2rK52JYxsMCiuN+mzkvBKx62W X-Received: by 2002:a6b:ef07:: with SMTP id k7mr3086563ioh.16.1623836398063; Wed, 16 Jun 2021 02:39:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623836398; cv=none; d=google.com; s=arc-20160816; b=qEqAiO6lGISqH5ixIOdXOt972SCey7oYdRA8beXpgOR7OBYUL5ocKf0iXxvgm+OrOD ZKeRzQwMR08scmWaGmra/tulD8QfGDm78iXm54kJtNDRLCg9rRtJhj1WjzbOlZXx1ZrD X9tZ7rVnBFzSSKmfCR6RJbH8PQd6J9oYk2z681+SCAvxcq/1IyfFIK39NKNXttv6kRGL bBImAcML0b1AxNppYKUHZ8jk+WqTwGebfElrJ2itaOtw3KLyzPmeG8CymdFeXf7yheFQ zl9UoXktyDoqd1Hqfvs/idtux4G6BhTfMDNUMoKknRVGZuR0yrrVpVH9efWMLx1dCCRw 3VfA== 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=GA1KYIOKOz7CvecqVggWWHjEjg0tW7gkRha0TyxYTQY=; b=AHN3cBviQiPWSLwz7gRbZeSKrWlOi+8vKRYfWQjswkNlxTaYN+gfJjvY128QuJ+sY7 Q10cTzxDT1I4JQ5zscAUnntPHPiiPIxWfgomMLOGtT3EchwiXzX3S9klqZgR5wJjJdda u9MZVA8ArFHYnt9rZD3IdsSu4zaG1ZgMvJygZNkE0247L0lVYeuQX0X75DLuQnvTxDwb R2QzTgDv6f/AOacnMFVBSw38Emrct09OiQcYVlj52GQt9dRZU7fA4ilFp8kkQueNhaAe ri3c9op+Tz6sm56KSDtA41NN+2VZds4ikbrdf3CLfpN9+l/zmkh+gbspcninRBnlElNI XpEw== 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 x4si2430685jat.39.2021.06.16.02.39.46; Wed, 16 Jun 2021 02:39:58 -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 S232479AbhFPJju (ORCPT + 99 others); Wed, 16 Jun 2021 05:39:50 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:10102 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232346AbhFPJjS (ORCPT ); Wed, 16 Jun 2021 05:39:18 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G4g4R0Y50zZf8G; Wed, 16 Jun 2021 17:34:15 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Wed, 16 Jun 2021 17:37:10 +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, 16 Jun 2021 17:37:09 +0800 From: Guangbin Huang To: , , , , CC: , , , Subject: [PATCH net-next 6/8] net: hdlc_ppp: remove unnecessary out of memory message Date: Wed, 16 Jun 2021 17:33:55 +0800 Message-ID: <1623836037-26812-7-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1623836037-26812-1-git-send-email-huangguangbin2@huawei.com> References: <1623836037-26812-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) 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_ppp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index 9bda2c5..7b7c02d 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c @@ -219,10 +219,9 @@ static void ppp_tx_cp(struct net_device *dev, u16 pid, u8 code, skb = dev_alloc_skb(sizeof(struct hdlc_header) + sizeof(struct cp_header) + magic_len + len); - if (!skb) { - netdev_warn(dev, "out of memory in ppp_tx_cp()\n"); + if (!skb) return; - } + skb_reserve(skb, sizeof(struct hdlc_header)); cp = skb_put(skb, sizeof(struct cp_header)); -- 2.8.1