UPSTREAM: PCI: rockchip: Fix rockchip_pcie_probe() error path to free resource list
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 10 Feb 2017 06:52:02 +0000 (14:52 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 16 Mar 2017 03:25:30 +0000 (11:25 +0800)
commit946c0541104092250afde0c7be9a396df5ad31b4
tree43fd9ef3c3f4b071d18908db5540c20a13b75299
parentced6f050d468bd2091a53e701e074deae15e1b77
UPSTREAM: PCI: rockchip: Fix rockchip_pcie_probe() error path to free resource list

rockchip_pcie_probe() calls of_pci_get_host_bridge_resources() to parse
resources from DT and build a resource list.  The caller is responsible for
disposing of the resource list.  This is normally done by
pci_release_host_bridge_dev() when the host bridge is removed.

If the host bridge probe fails, dispose of the resource list in the probe
error path.

Change-Id: Iefc17963a6ce99c64f2940d8dc2ba93bd00fe120
[bhelgaas: changelog]
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from f1d722b607d610b66785f7f00d2e1d457260647c)
drivers/pci/host/pcie-rockchip.c