PCI: dwc: Use devm_pci_alloc_host_bridge() to simplify code
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>
Fri, 29 Mar 2019 11:58:53 +0000 (11:58 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 7 May 2019 13:54:14 +0000 (08:54 -0500)
commite6fdd3bf5aecd8615f31a5128775b9abcf3e0d86
treed3a3ec744ebac2911c6b3bc5ca6ef994f2c2d7d7
parent9e2b5de5604a6ff2626c51e77014d92c9299722c
PCI: dwc: Use devm_pci_alloc_host_bridge() to simplify code

Use devm_pci_alloc_host_bridge() to simplify the error code path.  This
also fixes a leak in the dw_pcie_host_init() error path.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
CC: stable@vger.kernel.org # v4.13+
drivers/pci/controller/dwc/pcie-designware-host.c