[PATCH] pci: pci-tegra: fix null pointer assignation.
Sascha Hauer
s.hauer at pengutronix.de
Thu Nov 27 03:54:54 PST 2025
On Thu, Nov 27, 2025 at 10:19:34AM +0100, Lucas Stach wrote:
> Hi,
>
> Am Mittwoch, dem 26.11.2025 um 22:40 -0500 schrieb
> chalianis1 at gmail.com:
> > From: Chali Anis <chalianis1 at gmail.com>
> >
> > the dev might be null, to be sure we move the dev assignation before
> > the pci parent assignation.
>
> This isn't worded strongly enough. pcie->dev will absolutely be NULL at
> the point where it is assigned to pci.parent, which seem like a blatant
> bug and I don't know how this did ever work or if we just ignored the
> broken parent device connection.
Reworded to:
pci: pci-tegra: fix null pointer assignation.
By the time we set pcie->pci.parent pcie->dev is null. Initialize it
before usage.
Fixes: fd3be9d95f34 ("pci: add pci_controller_init()")
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list