Re: [PATCH v1 15/25] PCI: generic: Free resource list close to where it's allocated

2016-06-21 Thread Bjorn Helgaas
On Mon, Jun 20, 2016 at 06:22:40PM +0100, Lorenzo Pieralisi wrote: > On Mon, Jun 20, 2016 at 09:56:45AM -0700, Tyler Baker wrote: > > Hi Bjorn, > > > > On 6 June 2016 at 16:06, Bjorn Helgaas wrote: > > > Previously we allocated the PCI resource list in > > > gen_pci_parse_request_of_pci_ranges(),

Re: [PATCH v1 15/25] PCI: generic: Free resource list close to where it's allocated

2016-06-20 Thread Lorenzo Pieralisi
On Mon, Jun 20, 2016 at 09:56:45AM -0700, Tyler Baker wrote: > Hi Bjorn, > > On 6 June 2016 at 16:06, Bjorn Helgaas wrote: > > Previously we allocated the PCI resource list in > > gen_pci_parse_request_of_pci_ranges(), but if we had an error, we freed it > > on error in gen_pci_init(). > > > > Re

Re: [PATCH v1 15/25] PCI: generic: Free resource list close to where it's allocated

2016-06-20 Thread Tyler Baker
Hi Bjorn, On 6 June 2016 at 16:06, Bjorn Helgaas wrote: > Previously we allocated the PCI resource list in > gen_pci_parse_request_of_pci_ranges(), but if we had an error, we freed it > on error in gen_pci_init(). > > Reorder gen_pci_init() so we can take care of error path cleanup in > gen_pci_p

[PATCH v1 15/25] PCI: generic: Free resource list close to where it's allocated

2016-06-06 Thread Bjorn Helgaas
Previously we allocated the PCI resource list in gen_pci_parse_request_of_pci_ranges(), but if we had an error, we freed it on error in gen_pci_init(). Reorder gen_pci_init() so we can take care of error path cleanup in gen_pci_parse_request_of_pci_ranges() instead. Signed-off-by: Bjorn Helgaas