From 9b1673ef09f9a28e26ea12a6dc849e9a97cc60a8 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Wed, 18 Apr 2007 13:34:12 +1000 Subject: [PATCH] --- yaml --- r: 53382 b: refs/heads/master c: 9890b12a4a65a7b3181dd963421740edf0e14d69 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/pci/pci-sysfs.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index e9a6f8e3c28f..66ca8e11a940 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c0affe9db42bf85f4a606b3262c35ec59a5d3788 +refs/heads/master: 9890b12a4a65a7b3181dd963421740edf0e14d69 diff --git a/trunk/drivers/pci/pci-sysfs.c b/trunk/drivers/pci/pci-sysfs.c index 29676fe4f23e..284e83a527f9 100644 --- a/trunk/drivers/pci/pci-sysfs.c +++ b/trunk/drivers/pci/pci-sysfs.c @@ -636,7 +636,7 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) goto err_rom; } else { retval = -ENOMEM; - goto err_bin_file; + goto err_resource_files; } } /* add platform-specific attributes */ @@ -646,6 +646,8 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) err_rom: kfree(rom_attr); +err_resource_files: + pci_remove_resource_files(pdev); err_bin_file: if (pdev->cfg_size < 4096) sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr);