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/watchdog/alim1535_wdt.c |
Line in file: | 325 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2011-11-07 22:40:13 UTC |
295/* 296 * Data for PCI driver interface 297 * 298 * This data only exists for exporting the supported 299 * PCI ids via MODULE_DEVICE_TABLE. We do not actually 300 * register a pci_driver, because someone else might one day 301 * want to register another driver on the same PCI id. 302 */ 303 304static struct pci_device_id ali_pci_tbl[] = { 305 { PCI_VENDOR_ID_AL, 0x1533, PCI_ANY_ID, PCI_ANY_ID,}, 306 { PCI_VENDOR_ID_AL, 0x1535, PCI_ANY_ID, PCI_ANY_ID,}, 307 { 0, }, 308}; 309MODULE_DEVICE_TABLE(pci, ali_pci_tbl); 310 311/* 312 * ali_find_watchdog - find a 1535 and 7101 313 * 314 * Scans the PCI hardware for a 1535 series bridge and matching 7101 315 * watchdog device. This may be overtight but it is better to be safe 316 */ 317 318static int __init ali_find_watchdog(void) 319{ 320 struct pci_dev *pdev; 321 u32 wdog; 322 323 /* Check for a 1533/1535 series bridge */ 324 pdev = pci_get_device(PCI_VENDOR_ID_AL, 0x1535, NULL); 325 if (pdev == NULL) 326 pdev = pci_get_device(PCI_VENDOR_ID_AL, 0x1533, NULL); 327 if (pdev == NULL) 328 return -ENODEV; 329 pci_dev_put(pdev); 330 331 /* Check for the a 7101 PMU */ 332 pdev = pci_get_device(PCI_VENDOR_ID_AL, 0x7101, NULL); 333 if (pdev == NULL) 334 return -ENODEV; 335