Re: [PATCH] PCI: Clean up resource allocation in devm_of_pci_get_host_bridge_resources()

2018-06-29 Thread Bjorn Helgaas
On Wed, May 16, 2018 at 02:31:44PM +0200, Jan Kiszka wrote: > Instead of first allocating and then freeing memory for struct resource > in case we cannot parse a PCI resource from the device tree, work > against a local struct and kmemdup it when we decide to go with it. > > Suggested-by: Andy She

Re: [PATCH] PCI: Clean up resource allocation in devm_of_pci_get_host_bridge_resources()

2018-06-05 Thread Bjorn Helgaas
On Tue, Jun 05, 2018 at 07:26:57PM +0300, Andy Shevchenko wrote: > On Wed, May 16, 2018 at 3:31 PM, Jan Kiszka wrote: > > Instead of first allocating and then freeing memory for struct resource > > in case we cannot parse a PCI resource from the device tree, work > > against a local struct and kme

Re: [PATCH] PCI: Clean up resource allocation in devm_of_pci_get_host_bridge_resources()

2018-06-05 Thread Andy Shevchenko
On Wed, May 16, 2018 at 3:31 PM, Jan Kiszka wrote: > Instead of first allocating and then freeing memory for struct resource > in case we cannot parse a PCI resource from the device tree, work > against a local struct and kmemdup it when we decide to go with it. > Bjorn, any comments on this? >

Re: [PATCH] PCI: Clean up resource allocation in devm_of_pci_get_host_bridge_resources()

2018-05-16 Thread Vladimir Zapolskiy
On 05/16/2018 03:31 PM, Jan Kiszka wrote: > Instead of first allocating and then freeing memory for struct resource > in case we cannot parse a PCI resource from the device tree, work > against a local struct and kmemdup it when we decide to go with it. > > Suggested-by: Andy Shevchenko > Signed-

[PATCH] PCI: Clean up resource allocation in devm_of_pci_get_host_bridge_resources()

2018-05-16 Thread Jan Kiszka
Instead of first allocating and then freeing memory for struct resource in case we cannot parse a PCI resource from the device tree, work against a local struct and kmemdup it when we decide to go with it. Suggested-by: Andy Shevchenko Signed-off-by: Jan Kiszka --- drivers/pci/of.c | 14 ++-