]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86/oprofile: fix pci_dev use count for AMD northbridge devices
authorRobert Richter <robert.richter@amd.com>
Mon, 15 Dec 2008 14:09:50 +0000 (15:09 +0100)
committerRobert Richter <robert.richter@amd.com>
Mon, 29 Dec 2008 14:19:32 +0000 (15:19 +0100)
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>
arch/x86/oprofile/op_model_amd.c

index 98658f25f542b0be2a62116f1dcd61cb6d4e09a7..c5b5c7fb3ceda286cd5f24764e6307f344f16fc6 100644 (file)
@@ -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;