pciexp_device: Fix a bug in pciexp_enable_ltr()
'parent_cap' should be found from 'parent' instead of 'dev'. Signed-off-by: Bill XIE <persmule@hardenedlinux.org> Change-Id: I99dab83d90287ca924d30dc4aeac0ff96e877e5c Reviewed-on: https://review.coreboot.org/c/coreboot/+/66385 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Martin L Roth <gaumless@gmail.com>
This commit is contained in:
parent
debb8085c6
commit
a43380e3d5
|
@ -183,7 +183,7 @@ static void pciexp_enable_ltr(struct device *dev)
|
||||||
unsigned int parent_cap = 0;
|
unsigned int parent_cap = 0;
|
||||||
if (!dev->ops->ops_pci || !dev->ops->ops_pci->get_ltr_max_latencies) {
|
if (!dev->ops->ops_pci || !dev->ops->ops_pci->get_ltr_max_latencies) {
|
||||||
parent = dev->bus->dev;
|
parent = dev->bus->dev;
|
||||||
parent_cap = pci_find_capability(dev, PCI_CAP_ID_PCIE);
|
parent_cap = pci_find_capability(parent, PCI_CAP_ID_PCIE);
|
||||||
if (!parent_cap)
|
if (!parent_cap)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue