pci_resize_resource() assigns the resized BAR and the other BARs it released, or restores the original configuration on failure. Calling pci_assign_unassigned_bus_resources() after it is redundant. If that call manages to assign more resources in some scenario, the problem should be fixed inside pci_resize_resource() instead.
Remove the pci_assign_unassigned_bus_resources() call from __resource_resize_store(). Signed-off-by: Ilpo Järvinen <[email protected]> --- drivers/pci/pci-sysfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 6669e9ad5bd3..bccd0bd5091b 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -1731,7 +1731,6 @@ static ssize_t __resource_resize_store(struct device *dev, int n, const char *buf, size_t count) { struct pci_dev *pdev = to_pci_dev(dev); - struct pci_bus *bus = pdev->bus; unsigned long size; int ret; u16 cmd; @@ -1768,8 +1767,6 @@ static ssize_t __resource_resize_store(struct device *dev, int n, pci_warn(pdev, "Failed to resize BAR %d: %pe\n", n, ERR_PTR(ret)); - pci_assign_unassigned_bus_resources(bus); - if (sysfs_create_groups(&pdev->dev.kobj, pci_dev_resource_attr_groups)) pci_warn(pdev, "Failed to recreate resource groups after BAR resizing\n"); -- 2.47.3
