]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: tegra: Fix host bridge memory leakage
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 28 Jun 2017 20:13:54 +0000 (15:13 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 28 Jun 2017 20:13:54 +0000 (15:13 -0500)
commit1dceb3ab930b18709b189ee3c0936c4e5005e8e9
tree754daadf1829f0e0f94cb12a6fcd6edc965768b4
parentc0c03033e3ec051697087a6f668968b945499c00
PCI: tegra: 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>
Cc: Arnd Bergmann <arnd@arndb.de>
drivers/pci/host/pci-tegra.c