Showing error 1304

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


Source:

 925 */
 926#ifdef CONFIG_PROC_FS
 927static char *time_delta(char buffer[], long time)
 928{
 929        time -= jiffies;
 930        if (time > LongTime / 2)
 931                return ("Not scheduled");
 932        if (time < 0)
 933                time = 0;        /* Don't print negative times */
 934        sprintf(buffer, "%ld seconds", time / HZ);
 935        return (buffer);
 936}
 937
 938/* get Nth element of the linked list */
 939static struct strip *strip_get_idx(loff_t pos) 
 940{
 941        struct strip *str;
 942        int i = 0;
 943
 944        list_for_each_entry_rcu(str, &strip_list, list) {
 945                if (pos == i)
 946                        return str;
 947                ++i;
 948        }
 949        return NULL;
 950}
 951
 952static void *strip_seq_start(struct seq_file *seq, loff_t *pos)
 953{
 954        rcu_read_lock();
 955        return *pos ? strip_get_idx(*pos - 1) : SEQ_START_TOKEN;
 956}
 957
 958static void *strip_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 959{
 960        struct list_head *l;
 961        struct strip *s;
 962
 963        ++*pos;
 964        if (v == SEQ_START_TOKEN)
 965                return strip_get_idx(1);
Show full sources