From mboxrd@z Thu Jan 1 00:00:00 1970 From: linus.walleij@linaro.org (Linus Walleij) Date: Fri, 16 Jun 2017 11:02:13 +0200 Subject: [RFT PATCH v2 07/42] drivers: pci: host: ftpci100: Fix host bridge memory leakage In-Reply-To: <20170608141342.2018-8-lorenzo.pieralisi@arm.com> References: <20170608141342.2018-1-lorenzo.pieralisi@arm.com> <20170608141342.2018-8-lorenzo.pieralisi@arm.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Jun 8, 2017 at 4:13 PM, Lorenzo Pieralisi wrote: > When probing the PCI host controller driver, if an error condition > is trigger the probe function code does not free memory allocated > for the struct pci_host_bridge resulting in memory leakage. > > Move the struct pci_host_bridge allocation over to the respective > devm interface to fix the issue. > > Signed-off-by: Lorenzo Pieralisi > Cc: Arnd Bergmann > Cc: Bjorn Helgaas Acked-by: Linus Walleij Yours, Linus Walleij