Showing error 1244

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/base/power/main.c
Line in file: 56
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 26
 27#include "../base.h"
 28#include "power.h"
 29
 30/*
 31 * The entries in the dpm_list list are in a depth first order, simply
 32 * because children are guaranteed to be discovered after parents, and
 33 * are inserted at the back of the list on discovery.
 34 *
 35 * Since device_pm_add() may be called with a device semaphore held,
 36 * we must never try to acquire a device semaphore while holding
 37 * dpm_list_mutex.
 38 */
 39
 40LIST_HEAD(dpm_list);
 41
 42static DEFINE_MUTEX(dpm_list_mtx);
 43
 44/*
 45 * Set once the preparation of devices for a PM transition has started, reset
 46 * before starting to resume devices.  Protected by dpm_list_mtx.
 47 */
 48static bool transition_started;
 49
 50/**
 51 *        device_pm_lock - lock the list of active devices used by the PM core
 52 */
 53void device_pm_lock(void)
 54{
 55        mutex_lock(&dpm_list_mtx);
 56}
 57
 58/**
 59 *        device_pm_unlock - unlock the list of active devices used by the PM core
 60 */
 61void device_pm_unlock(void)
 62{
 63        mutex_unlock(&dpm_list_mtx);
 64}
 65
 66/**
Show full sources