Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9890b12a4a65a7b3181dd963421740edf0e14d69 Commit: 9890b12a4a65a7b3181dd963421740edf0e14d69 Parent: c0affe9db42bf85f4a606b3262c35ec59a5d3788 Author: Michael Ellerman <[EMAIL PROTECTED]> AuthorDate: Wed Apr 18 13:34:12 2007 +1000 Committer: Greg Kroah-Hartman <[EMAIL PROTECTED]> CommitDate: Wed May 2 19:02:43 2007 -0700
PCI: Free resource files in error path of pci_create_sysfs_dev_files() pci_create_sysfs_dev_files() should call pci_remove_resource_files() in its error path, to match the call it makes to pci_create_resource_files(). Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- drivers/pci/pci-sysfs.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 29676fe..284e83a 100644 --- a/drivers/pci/pci-sysfs.c +++ b/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); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html