diff options
author | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2020-09-04 16:09:04 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2020-09-08 23:52:42 +0200 |
commit | e338eecf3fe79054e8a31b8c39a1234b5acfdabe (patch) | |
tree | 155e65e0a9fa813e32535dc256fe4330e8b2b8d4 /MAINTAINERS | |
parent | PCI/P2PDMA: Fix build without DMA ops (diff) | |
download | linux-e338eecf3fe79054e8a31b8c39a1234b5acfdabe.tar.xz linux-e338eecf3fe79054e8a31b8c39a1234b5acfdabe.zip |
PCI: rockchip: Fix bus checks in rockchip_pcie_valid_device()
The root bus checks rework in d84c572de1a3 ("PCI: rockchip: Use
pci_is_root_bus() to check if bus is root bus") caused a regression whereby
in rockchip_pcie_valid_device() if the bus parameter is the root bus and
the dev value == 0, the function should return 1 (ie true) without checking
if the bus->parent pointer is a root bus because that triggers a NULL
pointer dereference.
Fix this by streamlining the root bus detection.
Fixes: d84c572de1a3 ("PCI: rockchip: Use pci_is_root_bus() to check if bus is root bus")
Link: https://lore.kernel.org/r/20200904140904.944-1-lorenzo.pieralisi@arm.com
Reported-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Tested-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Shawn Lin <shawn.lin@rock-chips.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions