Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965437AbeAMAIq (ORCPT + 1 other); Fri, 12 Jan 2018 19:08:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:33584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965312AbeAMAIo (ORCPT ); Fri, 12 Jan 2018 19:08:44 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6BFB2173D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Fri, 12 Jan 2018 18:08:39 -0600 From: Bjorn Helgaas To: SF Markus Elfring Cc: linux-pci@vger.kernel.org, Bjorn Helgaas , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] pci/setup-bus: Delete an error message for a failed memory allocation in add_to_list() Message-ID: <20180113000839.GD205469@bhelgaas-glaptop.roam.corp.google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Fri, Dec 29, 2017 at 12:47:11PM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 29 Dec 2017 12:15:16 +0100 > > Omit an extra message for a memory allocation failure in this function. If this is an "extra" message, I assume there's some other message? Can you mention where that is in the changelog? Also, please squash all the drivers/pci patches into one. > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring > --- > drivers/pci/setup-bus.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c > index b1ad466199ad..d131d29c4fdb 100644 > --- a/drivers/pci/setup-bus.c > +++ b/drivers/pci/setup-bus.c > @@ -67,10 +67,8 @@ static int add_to_list(struct list_head *head, > struct pci_dev_resource *tmp; > > tmp = kzalloc(sizeof(*tmp), GFP_KERNEL); > - if (!tmp) { > - pr_warn("add_to_list: kmalloc() failed!\n"); > + if (!tmp) > return -ENOMEM; > - } > > tmp->res = res; > tmp->dev = dev; > -- > 2.15.1 >