Re: [PATCH] PCI: layerscape: Fix drvdata usage before assignment

2016-10-17 Thread Bjorn Helgaas
On Mon, Oct 17, 2016 at 11:39:32AM +0100, Marc Zyngier wrote: > Commit fefe6733e516 ("PCI: layerscape: Move struct pcie_port setup > to probe function") changed the init ordering of the pcie structure, > but started to use the pcie->drvdata field before initializing it. > Mayhem follows. > > Fix t

[PATCH] PCI: layerscape: Fix drvdata usage before assignment

2016-10-17 Thread Marc Zyngier
Commit fefe6733e516 ("PCI: layerscape: Move struct pcie_port setup to probe function") changed the init ordering of the pcie structure, but started to use the pcie->drvdata field before initializing it. Mayhem follows. Fix this by moving the drvdata assignment right before the first use. Tested on