Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91e6af28 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: pcie: check root pci dev is valid in msm_pcie_set_link_bandwidth"

parents 74d166b4 a5aadd04
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -6230,6 +6230,9 @@ int msm_pcie_set_link_bandwidth(struct pci_dev *pci_dev, u16 target_link_speed,
		return -EINVAL;

	root_pci_dev = pci_find_pcie_root_port(pci_dev);
	if (!root_pci_dev)
		return -ENODEV;

	pcie_dev = PCIE_BUS_PRIV_DATA(root_pci_dev->bus);

	pcie_capability_read_word(root_pci_dev, PCI_EXP_LNKSTA, &link_status);