From: Chali Anis <[email protected]> the dev might be null, to be sure we move the dev assignation before the pci parent assignation.
Signed-off-by: Chali Anis <[email protected]> --- drivers/pci/pci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci-tegra.c b/drivers/pci/pci-tegra.c index b7f8297d153e..dabe63500a4a 100644 --- a/drivers/pci/pci-tegra.c +++ b/drivers/pci/pci-tegra.c @@ -1240,13 +1240,13 @@ static int tegra_pcie_probe(struct device *dev) if (!pcie) return -ENOMEM; + pcie->dev = dev; pcie->pci.parent = pcie->dev; pci_controller_init(&pcie->pci); INIT_LIST_HEAD(&pcie->buses); INIT_LIST_HEAD(&pcie->ports); pcie->soc_data = device_get_match_data(dev); - pcie->dev = dev; err = tegra_pcie_parse_dt(pcie); if (err < 0) {
