Showing error 1242

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: drivers/acpi/sleep/main.c
Line in file: 635
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

605
606        if (!device_may_wakeup(dev))
607                return -EINVAL;
608
609        handle = DEVICE_ACPI_HANDLE(dev);
610        if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) {
611                printk(KERN_DEBUG "ACPI handle has no context!\n");
612                return -ENODEV;
613        }
614
615        return enable ?
616                acpi_enable_wakeup_device_power(adev, acpi_target_sleep_state) :
617                acpi_disable_wakeup_device_power(adev);
618}
619#endif
620
621static void acpi_power_off_prepare(void)
622{
623        /* Prepare to power off the system */
624        acpi_sleep_prepare(ACPI_STATE_S5);
625        acpi_hw_disable_all_gpes();
626}
627
628static void acpi_power_off(void)
629{
630        /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
631        printk("%s called\n", __func__);
632        local_irq_disable();
633        acpi_enable_wakeup_device(ACPI_STATE_S5);
634        acpi_enter_sleep_state(ACPI_STATE_S5);
635}
636
637int __init acpi_sleep_init(void)
638{
639        acpi_status status;
640        u8 type_a, type_b;
641#ifdef CONFIG_SUSPEND
642        int i = 0;
643
644        dmi_check_system(acpisleep_dmi_table);
645#endif
Show full sources