aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-bridge.c
diff options
context:
space:
mode:
authorArd Biesheuvel <[email protected]>2020-04-21 18:22:56 +0200
committerBjorn Helgaas <[email protected]>2020-05-01 12:28:35 -0500
commitd09ddd8190fbdc07696bf34b548ae15aa1816714 (patch)
tree82bee057aed9989180f930451a34205d90ce3683 /drivers/fpga/fpga-bridge.c
parent8f3d9f354286745c751374f5f1fcafee6b3f3136 (diff)
PCI: Allow pci_resize_resource() for devices on root bus
When resizing a BAR, pci_reassign_bridge_resources() is invoked to bring the bridge windows of parent bridges in line with the new BAR assignment. This assumes the device whose BAR is being resized lives on a subordinate bus, but this is not necessarily the case. A device may live on the root bus, in which case dev->bus->self is NULL, and passing a NULL pci_dev pointer to pci_reassign_bridge_resources() will cause it to crash. So let's make the call to pci_reassign_bridge_resources() conditional on whether dev->bus->self is non-NULL in the first place. Fixes: 8bb705e3e79d84e7 ("PCI: Add pci_resize_resource() for resizing BARs") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions