Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1575616ybz; Thu, 23 Apr 2020 01:16:31 -0700 (PDT) X-Google-Smtp-Source: APiQypLN2Dl4vV31wacYceT6qekYm7rXnQOuOxPsWpfuYb95R20y+ZK+cRPmT7pX1qcz3yywfgGb X-Received: by 2002:a17:906:13d1:: with SMTP id g17mr1769437ejc.162.1587629791731; Thu, 23 Apr 2020 01:16:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587629791; cv=none; d=google.com; s=arc-20160816; b=VZI554FewcjBEBX/fkCG1k07aLTnV9lCVVEIMBSs2p1yErOTbxSSCOU7P8mdqSyhZY OstUM10nh/6zG4DuvfHyHXjFjaNIe/S3C5BudV6314ebfpEfI277zhRs/LQTP1jC0uzI jIAluImGzoW5OYnN+ZRvdBC7l7VJdZDgH5LJLTuU36CpsWDjqFF1yYBN7apoyaN+R5SU TKNWeCDB60/5uT19WXf4tMZBKsHufj1nhll8fV+xYDURqRvA+puaWfp3DCkPXS4HW0aK h2N806MbkHAlg8eq+PGtdNoPcFOXeJMnOF5aR4OIxKxtEOMtQvR1pNyPFhjPzIp220z/ V4sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=f78ukyMvG+kQb9LQIC9PYiH5PzgXI3IVpz8H+xsau8M=; b=rHqgeqyJKUgF+rU8Rnoh8gJfAF1bBf9N+PHBsISK92HHb4sai5NKoSVSuPpg+C9sTU hIefV5/nvwq7pQqMn3UoZ8qVHZ3Q1/CfalmpBdXYVovL9V3aTSSnNpVlZl0keVmH3Nyb ybVBYC4SJ2GPcpBl0+2pZwt5ExM2vS5QGDNKUmeGcko4SI6jD/+wjYMstXcWldXga3tc ASfRrhzITVxhg3Ig08SiG8Gk/H6W32pbaOGIGQqt2uzfEzTjAEtOf3iBEH3SsDyxSx8F 419YPBo9/WEC4M2hHDrZR5urj9LbsUP8leRt4+GDBYH0tCjH9PZsHvKDV2qf4tHiapd8 qGRA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a63si763731ede.399.2020.04.23.01.16.08; Thu, 23 Apr 2020 01:16:31 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726470AbgDWIOo (ORCPT + 99 others); Thu, 23 Apr 2020 04:14:44 -0400 Received: from smtprelay0200.hostedemail.com ([216.40.44.200]:47392 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725854AbgDWIOo (ORCPT ); Thu, 23 Apr 2020 04:14:44 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id F3D221801A88C; Thu, 23 Apr 2020 08:14:42 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2899:3138:3139:3140:3141:3142:3352:3622:3865:3866:3868:3870:3871:3874:4250:4321:5007:6119:7903:10004:10400:10848:11026:11232:11657:11658:11914:12043:12048:12296:12297:12555:12740:12760:12895:12986:13019:13069:13095:13311:13357:13439:14181:14659:14721:21080:21212:21433:21451:21627:21660:21990:30054:30055:30056:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: foot95_6332a6b883714 X-Filterd-Recvd-Size: 2131 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA; Thu, 23 Apr 2020 08:14:41 +0000 (UTC) Message-ID: <39759644335be80aa259f20f7cfc6108bd9de363.camel@perches.com> Subject: Re: [PATCH] ipw2x00: Remove a memory allocation failure log message From: Joe Perches To: Christophe JAILLET , stas.yakovlev@gmail.com, kvalo@codeaurora.org, davem@davemloft.net Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Date: Thu, 23 Apr 2020 01:12:24 -0700 In-Reply-To: <20200423075825.18206-1-christophe.jaillet@wanadoo.fr> References: <20200423075825.18206-1-christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-04-23 at 09:58 +0200, Christophe JAILLET wrote: > Axe a memory allocation failure log message. This message is useless and > incorrect (vmalloc is not used here for the memory allocation) > > This has been like that since the very beginning of this driver in > commit 43f66a6ce8da ("Add ipw2200 wireless driver.") > > Signed-off-by: Christophe JAILLET > --- > drivers/net/wireless/intel/ipw2x00/ipw2200.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c > index 60b5e08dd6df..30c4f041f565 100644 > --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c > +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c > @@ -3770,10 +3770,9 @@ static int ipw_queue_tx_init(struct ipw_priv *priv, > struct pci_dev *dev = priv->pci_dev; > > q->txb = kmalloc_array(count, sizeof(q->txb[0]), GFP_KERNEL); > - if (!q->txb) { > - IPW_ERROR("vmalloc for auxiliary BD structures failed\n"); > + if (!q->txb) > return -ENOMEM; > - } > + This might avoid possible defects by using kcalloc instead too