Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1951519ima; Thu, 25 Oct 2018 07:28:59 -0700 (PDT) X-Google-Smtp-Source: AJdET5eI489ISb6A/kYRep7nOusGBbI9pkH0bKW8v2W2HIDrrxAlCU1arMG5wK55ydBu1PNHqCdI X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr1773975plt.268.1540477739150; Thu, 25 Oct 2018 07:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540477739; cv=none; d=google.com; s=arc-20160816; b=LDv/bou+jGtCE+VhnF6DinU6DfD2LfB+3I9+17dzhPtp89sfTOPRLeNbgnehJp6kiq l6WfCEpCh1f01du05KD3aYyE1iUC0/IhMlJueqgakhZVibjnAVaSJEtE+njeSzbvIisQ HSapLZuhsz2r9vC7zWr/p+H4TKQUv2yHoMwtdZuVl9SEBI+sd3n7qYnXp7kkp+OcGfN2 mW4KtmW0XWtWCReSN9MpxNFmQjlcgXrMwlv1TN6cln9uIunveoE4XVGBKdTD9RUPlGIa 8Bjl12/AOuyEvddPnjcjjGDQR58tM9vtMdLL1z+/uUxnfFQdcz9zAweZ10I6ZOOA9EvU nn2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=26PuNmbDEHED3esCFCtGLshkoDYabK3zzB0sbT49Ybk=; b=d8KMzkZwb2o+DhfEAea9hDSmSXv3mFfe0EJCA87XTSF+X6OStyhDl7yTACmyGd0sCM AAXDsPyQZEc82NvSQ+fTvq8s7lz7CfVqHsRvqmUv0Cb4GsbjeOv7DXNQvvuRkE7WfrrP FuwLjImJpvxSzwQv3swMj0kk1A1z3M9gxfe8k++18x7vqvBjYWzzkjhTE/5tf7rV+lfT AglmYpltfhXi7czV6nefa4V1FjayRp+I4gg5gWOfkkcJ+Va1Obc8cKuFo3ZNDyLxYuq1 py515DwHAYfyd21B6PeR8kLQjtswX2XtNlIrAHQtQk/VuYLjiskfIV2QBkuXbUIdNJbo i/AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KO7icAXf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q17-v6si8143916pgi.491.2018.10.25.07.27.56; Thu, 25 Oct 2018 07:28:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KO7icAXf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730987AbeJYWxT (ORCPT + 99 others); Thu, 25 Oct 2018 18:53:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:35810 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729507AbeJYWxT (ORCPT ); Thu, 25 Oct 2018 18:53:19 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9F2F920848; Thu, 25 Oct 2018 14:20:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540477221; bh=QIRQztWzFMnjKGrvX95JHXgGOlWEWWd+caGT0ukZnkY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KO7icAXfRuYz5/Def+DkHSi9m7i5xc30FkRNhMuGLYNGLb/4QMQ5NEAcRSKDs/ehu wRfSvwzXhYykJvPWs+WgEPhpaViL1zevBtmr9nQxbQEXrPXNXo5Hmcw9jOk5CWWWtU m5DKhqHeozZENzROgoxCOX+4TANpa10RQolsr2tA= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lorenzo Pieralisi , Bjorn Helgaas , "Rafael J . Wysocki" , Sasha Levin Subject: [PATCH AUTOSEL 3.18 57/98] of/pci: Remove duplicate kfree in of_pci_get_host_bridge_resources() Date: Thu, 25 Oct 2018 10:18:12 -0400 Message-Id: <20181025141853.214051-57-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141853.214051-1-sashal@kernel.org> References: <20181025141853.214051-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lorenzo Pieralisi [ Upstream commit feb28979c137ba3f649ad36fc27c85c64c111f78 ] Commit d2be00c0fb5a ("of/pci: Free resources on failure in of_pci_get_host_bridge_resources()") fixed the error path so it frees everything on the "resources" list. That list includes the bus_range, so we should not free it again. Remove the superfluous free of bus_range. [bhelgaas: changelog] Fixes: d2be00c0fb5a ("of/pci: Free resources on failure in of_pci_get_host_bridge_resources()") Reported-by: Jiang Liu Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas CC: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/of/of_pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c index ecc5fa5640d2..8a74b1d399a1 100644 --- a/drivers/of/of_pci.c +++ b/drivers/of/of_pci.c @@ -229,7 +229,6 @@ int of_pci_get_host_bridge_resources(struct device_node *dev, list_for_each_entry(window, resources, list) kfree(window->res); pci_free_resource_list(resources); - kfree(bus_range); return err; } EXPORT_SYMBOL_GPL(of_pci_get_host_bridge_resources); -- 2.17.1