Showing error 854

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/alim7101_wdt.c
Line in file: 357
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:40:13 UTC


Source:

327        return NOTIFY_DONE;
328}
329
330/*
331 *        The WDT needs to learn about soft shutdowns in order to
332 *        turn the timebomb registers off.
333 */
334
335static struct notifier_block wdt_notifier = {
336        .notifier_call = wdt_notify_sys,
337};
338
339static void __exit alim7101_wdt_unload(void)
340{
341        wdt_turnoff();
342        /* Deregister */
343        misc_deregister(&wdt_miscdev);
344        unregister_reboot_notifier(&wdt_notifier);
345        pci_dev_put(alim7101_pmu);
346}
347
348static int __init alim7101_wdt_init(void)
349{
350        int rc = -EBUSY;
351        struct pci_dev *ali1543_south;
352        char tmp;
353
354        printk(KERN_INFO PFX "Steve Hill <steve@navaho.co.uk>.\n");
355        alim7101_pmu = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101,
356                NULL);
357        if (!alim7101_pmu) {
358                printk(KERN_INFO PFX "ALi M7101 PMU not present - WDT not set\n");
359                return -EBUSY;
360        }
361
362        /* Set the WDT in the PMU to 1 second */
363        pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, 0x02);
364
365        ali1543_south = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533,
366                NULL);
367        if (!ali1543_south) {
Show full sources