Showing error 890

User: Jiri Slaby
Error type: Resource Leak
Error type description: The code omits to put the resource to the system for reuse
File location: drivers/pci/quirks.c
Line in file: 56
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:41:42 UTC


Source:

  26#include "pci.h"
  27
  28int isa_dma_bridge_buggy;
  29EXPORT_SYMBOL(isa_dma_bridge_buggy);
  30int pci_pci_problems;
  31EXPORT_SYMBOL(pci_pci_problems);
  32int pcie_mch_quirk;
  33EXPORT_SYMBOL(pcie_mch_quirk);
  34
  35#ifdef CONFIG_PCI_QUIRKS
  36/* The Mellanox Tavor device gives false positive parity errors
  37 * Mark this device with a broken_parity_status, to allow
  38 * PCI scanning code to "skip" this now blacklisted device.
  39 */
  40static void __devinit quirk_mellanox_tavor(struct pci_dev *dev)
  41{
  42        dev->broken_parity_status = 1;        /* This device gives false positives */
  43}
  44DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR,quirk_mellanox_tavor);
  45DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE,quirk_mellanox_tavor);
  46
  47/* Deal with broken BIOS'es that neglect to enable passive release,
  48   which can cause problems in combination with the 82441FX/PPro MTRRs */
  49static void quirk_passive_release(struct pci_dev *dev)
  50{
  51        struct pci_dev *d = NULL;
  52        unsigned char dlc;
  53
  54        /* We have to make sure a particular bit is set in the PIIX3
  55           ISA bridge, so we have to go out and find it. */
  56        while ((d = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, d))) {
  57                pci_read_config_byte(d, 0x82, &dlc);
  58                if (!(dlc & 1<<1)) {
  59                        dev_err(&d->dev, "PIIX3: Enabling Passive Release\n");
  60                        dlc |= 1<<1;
  61                        pci_write_config_byte(d, 0x82, dlc);
  62                }
  63        }
  64}
  65DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,        PCI_DEVICE_ID_INTEL_82441,        quirk_passive_release);
  66DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,        PCI_DEVICE_ID_INTEL_82441,        quirk_passive_release);
Show full sources