Showing error 1074

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: 1873
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

1843                break;
1844        default:
1845                IRDA_DEBUG(1, "%s(), Unknow IrLAP disconnect reason %d!\n",
1846                           __func__, lap_reason);
1847                reason = LM_LAP_DISCONNECT;
1848                break;
1849        }
1850
1851        return reason;
1852}
1853
1854#ifdef CONFIG_PROC_FS
1855
1856struct irlmp_iter_state {
1857        hashbin_t *hashbin;
1858};
1859
1860#define LSAP_START_TOKEN        ((void *)1)
1861#define LINK_START_TOKEN        ((void *)2)
1862
1863static void *irlmp_seq_hb_idx(struct irlmp_iter_state *iter, loff_t *off)
1864{
1865        void *element;
1866
1867        spin_lock_irq(&iter->hashbin->hb_spinlock);
1868        for (element = hashbin_get_first(iter->hashbin);
1869             element != NULL;
1870             element = hashbin_get_next(iter->hashbin)) {
1871                if (!off || *off-- == 0) {
1872                        /* NB: hashbin left locked */
1873                        return element;
1874                }
1875        }
1876        spin_unlock_irq(&iter->hashbin->hb_spinlock);
1877        iter->hashbin = NULL;
1878        return NULL;
1879}
1880
1881
1882static void *irlmp_seq_start(struct seq_file *seq, loff_t *pos)
1883{
Show full sources