]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: layerscape: Fix drvdata usage before assignment
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 17 Oct 2016 10:39:32 +0000 (11:39 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 17 Oct 2016 12:58:18 +0000 (07:58 -0500)
commitf5fa9be12d733c60b968138c5b5ec13610154878
treefda0bde3ac2f21d1128a274893559823c41adfa8
parent94835a99b8178fa793d78fadf92bd3bdda24c542
PCI: layerscape: Fix drvdata usage before assignment

Commit b7b0f34855f9 ("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 LS2085a.

Fixes: efe6733e516 ("PCI: layerscape: Move struct pcie_port setup to probe function")
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/host/pci-layerscape.c