]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: faraday: Fix host bridge memory leakage
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 28 Jun 2017 20:13:53 +0000 (15:13 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 28 Jun 2017 20:13:53 +0000 (15:13 -0500)
commitf5f30ede1d0e8e0268815ed2d7fdc9e8299a7851
tree72b852a3432e1281271da53fb38953e2e2afef69
parente4de80b3e446c4ee6e098ea5c6b6455555c3f2b0
PCI: faraday: Fix host bridge memory leakage

When probing the PCI host controller driver, if an error occurs, 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 <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
drivers/pci/host/pci-ftpci100.c