of/pci: Fix pci_get_host_bridge_device leak
authorSuthikulpanit, Suravee <Suravee.Suthikulpanit@amd.com>
Wed, 28 Oct 2015 22:50:52 +0000 (15:50 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 7 Nov 2015 00:29:22 +0000 (01:29 +0100)
commit37efbe20fb19cee43d95b7ba9e54d5d0b00c0d67
tree48f7873f8d9e6e1d9ecb19b58ef825872a525c80
parentab3d527329f01dd63dc852041006d1a24895d116
of/pci: Fix pci_get_host_bridge_device leak

In case of error, the current code return w/o calling
pci_put_host_bridge_device. This patch fixes this.

Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/of/of_pci.c