summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2008-12-15 14:09:50 (GMT)
committerRobert Richter <robert.richter@amd.com>2008-12-29 14:19:32 (GMT)
commit83bd9243956f30d91851b272988a237999b35b10 (patch)
treee158b04203883af02c4f2dcba9aa8958fb2ef897 /arch
parent9966718daee592fbdc523703b2d8200009642506 (diff)
downloadlinux-83bd9243956f30d91851b272988a237999b35b10.tar.xz
x86/oprofile: fix pci_dev use count for AMD northbridge devices
This patch fixes the PCI device use count for AMD northbridge devices. In case of an IBS LVT initialization failure, the PCI device is released now by calling pci_dev_put(). If there are no initialization errors, the devices are released in pci_get_device() while iterating. Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/oprofile/op_model_amd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c
index 98658f2..c5b5c7f 100644
--- a/arch/x86/oprofile/op_model_amd.c
+++ b/arch/x86/oprofile/op_model_amd.c
@@ -409,6 +409,7 @@ static int init_ibs_nmi(void)
| IBSCTL_LVTOFFSETVAL);
pci_read_config_dword(cpu_cfg, IBSCTL, &value);
if (value != (ibs_eilvt_off | IBSCTL_LVTOFFSETVAL)) {
+ pci_dev_put(cpu_cfg);
printk(KERN_DEBUG "Failed to setup IBS LVT offset, "
"IBSCTL = 0x%08x", value);
return 1;