mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] pci: pci-tegra: fix null pointer assignation.
@ 2025-11-27  3:40 chalianis1
  2025-11-27  9:19 ` Lucas Stach
  2025-11-27 11:53 ` Sascha Hauer
  0 siblings, 2 replies; 5+ messages in thread
From: chalianis1 @ 2025-11-27  3:40 UTC (permalink / raw)
  To: s.hauer; +Cc: barebox, Chali Anis

From: Chali Anis <chalianis1@gmail.com>

the dev might be null, to be sure we move the dev assignation before
the pci parent assignation.

Signed-off-by: Chali Anis <chalianis1@gmail.com>
---
 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) {



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-11-27 11:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-27  3:40 [PATCH] pci: pci-tegra: fix null pointer assignation chalianis1
2025-11-27  9:19 ` Lucas Stach
2025-11-27 11:53   ` Sascha Hauer
2025-11-27 11:54   ` Sascha Hauer
2025-11-27 11:53 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox