Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp900968pxj; Fri, 4 Jun 2021 00:39:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFevKLn2QFFQxgW9vJQHimh9RVWsGGpWB1aX3W5SumqzY12bmL7OA1Ca8XLpy/1hF7KKYT X-Received: by 2002:a05:6402:22f7:: with SMTP id dn23mr3419541edb.136.1622792346439; Fri, 04 Jun 2021 00:39:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622792346; cv=none; d=google.com; s=arc-20160816; b=wZ1O8zIbk44H1ERR1D6YHgw4fPJ4Ea+QvY1zVDwVB5+pfP7DMaavlkXT+o/BHFTqes f6ohAP41jUooB5ZgqdDnqtVLBxa6v88HEwivuEgRln18av4eU1FlzGfb7gjEcQzGQ9PB CQ4nUi8cjrykyU9uWsM0TjwKQLsperYm07h0pxqavvTrC5lOu47mOTxkoAcqnhke3tsG wka0+c+7D9PqKrfBL+MfjV9qZn9pJVhNtcDaVIaJ8auZ8f8pBxigKyCbuwHfQf0N6eNA VCF9j3IRXDswFqfM3lopatSjWFLY8s245s/jkYwNBnlWEcC4MNq3d7GAixTgXq2NWaBx x73Q== 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=f8LBU6xlJrLXFtTmtvmGn1Rs/JCLlu7pCcEoqu3jems=; b=o2LqargnnaaJUowNcxvuqcq3YH/mkJMPWisjnTC9Ef15QsjYsBkGTkvCMukVQYn9El GtyVkeE0u9slLzmtSQVyCFDrNDPSAMEqEBG2EOMRtRJTMKC3GDopyVQ2LNBFO/6MBsxs 9VFtzMsmMGTDmL5/YJFmUMa3l5o9qc91VlymFfgunBnArhI6BzllfXciUDdedeaKk/JT cl1l6BgzVyGO4rUUT+OAlZSsDZPHbCc89877qKxfWb10AbyfQ9A5Do0AnRPRTImYEJRf 5gd2wvrooB+H01GUa4I9bqvLOuVWb7w0IIz9fmqckW5d5qvHCC7pUyn+TgC2dW6+pQDf 0ZzQ== 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 v4si4932066edj.103.2021.06.04.00.38.41; Fri, 04 Jun 2021 00:39:06 -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 S230111AbhFDHhS (ORCPT + 99 others); Fri, 4 Jun 2021 03:37:18 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3426 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230078AbhFDHhG (ORCPT ); Fri, 4 Jun 2021 03:37:06 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4FxDxG55jJz6vGg; Fri, 4 Jun 2021 15:32:18 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Fri, 4 Jun 2021 15:35:18 +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, 4 Jun 2021 15:35:17 +0800 From: Guangbin Huang To: , , , , CC: , , , Subject: [PATCH net-next 2/6] net: hdlc_x25: remove unnecessary out of memory message Date: Fri, 4 Jun 2021 15:32:08 +0800 Message-ID: <1622791932-49876-3-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622791932-49876-1-git-send-email-huangguangbin2@huawei.com> References: <1622791932-49876-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_x25.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c index 86b88f2..525eb42 100644 --- a/drivers/net/wan/hdlc_x25.c +++ b/drivers/net/wan/hdlc_x25.c @@ -56,10 +56,8 @@ static void x25_connect_disconnect(struct net_device *dev, int reason, int code) unsigned char *ptr; skb = __dev_alloc_skb(1, GFP_ATOMIC | __GFP_NOMEMALLOC); - if (!skb) { - netdev_err(dev, "out of memory\n"); + if (!skb) return; - } ptr = skb_put(skb, 1); *ptr = code; -- 2.8.1