Showing error 970

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/irda/irlmp.c
Line in file: 1913
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:17 UTC


Source:

1883{
1884        struct irlmp_iter_state *iter = seq->private;
1885        void *v;
1886        loff_t off = *pos;
1887
1888        iter->hashbin = NULL;
1889        if (off-- == 0)
1890                return LSAP_START_TOKEN;
1891
1892        iter->hashbin = irlmp->unconnected_lsaps;
1893        v = irlmp_seq_hb_idx(iter, &off);
1894        if (v)
1895                return v;
1896
1897        if (off-- == 0)
1898                return LINK_START_TOKEN;
1899
1900        iter->hashbin = irlmp->links;
1901        return irlmp_seq_hb_idx(iter, &off);
1902}
1903
1904static void *irlmp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
1905{
1906        struct irlmp_iter_state *iter = seq->private;
1907
1908        ++*pos;
1909
1910        if (v == LSAP_START_TOKEN) {                /* start of list of lsaps */
1911                iter->hashbin = irlmp->unconnected_lsaps;
1912                v = irlmp_seq_hb_idx(iter, NULL);
1913                return v ? v : LINK_START_TOKEN;
1914        }
1915
1916        if (v == LINK_START_TOKEN) {                /* start of list of links */
1917                iter->hashbin = irlmp->links;
1918                return irlmp_seq_hb_idx(iter, NULL);
1919        }
1920
1921        v = hashbin_get_next(iter->hashbin);
1922
1923        if (v == NULL) {                        /* no more in this hash bin */
Show full sources