diff options
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
| -rw-r--r-- | drivers/pci/pci-sysfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index a1d2e979b17f..f952bfea48a6 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
| @@ -642,6 +642,9 @@ err: | |||
| 642 | */ | 642 | */ |
| 643 | void pci_remove_sysfs_dev_files(struct pci_dev *pdev) | 643 | void pci_remove_sysfs_dev_files(struct pci_dev *pdev) |
| 644 | { | 644 | { |
| 645 | if (!sysfs_initialized) | ||
| 646 | return; | ||
| 647 | |||
| 645 | if (pdev->cfg_size < 4096) | 648 | if (pdev->cfg_size < 4096) |
| 646 | sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); | 649 | sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); |
| 647 | else | 650 | else |
