PCI: iproc: Free resource list after registration
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 24 May 2015 20:37:03 +0000 (22:37 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 27 May 2015 23:34:05 +0000 (18:34 -0500)
commitef07991a95de76b07594448c3521361831ec2cfe
tree028f4d52668d97e3ca04322e004c7a71b154c33f
parent18c4342aa56d70176eea85021e6fe8f6f8f39c7b
PCI: iproc: Free resource list after registration

The resource list is only used in the setup process and was never freed.
pci_add_resource() allocates a memory area to store the list item.

Fix the memory leak.

Tested-by: Ray Jui <rjui@broadcom.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
drivers/pci/host/pcie-iproc-bcma.c
drivers/pci/host/pcie-iproc-platform.c