of/pci: Free resources on failure in of_pci_get_host_bridge_resources()
of/pci: Free resources on failure in of_pci_get_host_bridge_resources()

In the function of_pci_get_host_bridge_resources() if the parsing of ranges
fails, previously allocated resources inclusive of bus_range are not freed
and are not expected to be freed by the function caller on error return.

This patch fixes the issues by adding code that properly frees resources
and bus_range before exiting the function with an error return value.

Fixes: cbe4097f8ae6 ("of/pci: Add support for parsing PCI host bridge resources from DT")
Signed-off-by: Lorenzo Pieralisi <b07d7e22a002c36e256b78f51f1f0db608e62a13@arm.com>
Signed-off-by: Bjorn Helgaas <f10ec01be0c6b54271af5c550cd257810bdf3268@google.com>
Acked-by: Liviu Dudau <241e262a49f9916b9dc45cbed05ee6b245e5c836@arm.com>
CC: Arnd Bergmann <f2c659f01951776204a6c5b902787d9019fbeebd@arndb.de>
CC: Rob Herring <988782c95b9025801edfc9a5b1fd5a8e93699e07@kernel.org>
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs