Showing error 1452

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


Source:

469
470}
471
472/*
473 *        Generate the /proc/net information for the token ring RIF
474 *        routing.
475 */
476
477#ifdef CONFIG_PROC_FS
478
479static struct rif_cache *rif_get_idx(loff_t pos)
480{
481        int i;
482        struct rif_cache *entry;
483        loff_t off = 0;
484
485        for(i = 0; i < RIF_TABLE_SIZE; i++)
486                for(entry = rif_table[i]; entry; entry = entry->next) {
487                        if (off == pos)
488                                return entry;
489                        ++off;
490                }
491
492        return NULL;
493}
494
495static void *rif_seq_start(struct seq_file *seq, loff_t *pos)
496{
497        spin_lock_irq(&rif_lock);
498
499        return *pos ? rif_get_idx(*pos - 1) : SEQ_START_TOKEN;
500}
501
502static void *rif_seq_next(struct seq_file *seq, void *v, loff_t *pos)
503{
504        int i;
505        struct rif_cache *ent = v;
506
507        ++*pos;
508
509        if (v == SEQ_START_TOKEN) {
Show full sources