Showing error 1061

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/isdn/i4l/isdn_net.h
Line in file: 96
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

 66        else 
 67                return 1;
 68}
 69
 70/*
 71 * For the given net device, this will get a non-busy channel out of the
 72 * corresponding bundle. The returned channel is locked.
 73 */
 74static __inline__ isdn_net_local * isdn_net_get_locked_lp(isdn_net_dev *nd)
 75{
 76        unsigned long flags;
 77        isdn_net_local *lp;
 78
 79        spin_lock_irqsave(&nd->queue_lock, flags);
 80        lp = nd->queue;         /* get lp on top of queue */
 81        spin_lock(&nd->queue->xmit_lock);
 82        while (isdn_net_lp_busy(nd->queue)) {
 83                spin_unlock(&nd->queue->xmit_lock);
 84                nd->queue = nd->queue->next;
 85                if (nd->queue == lp) { /* not found -- should never happen */
 86                        lp = NULL;
 87                        goto errout;
 88                }
 89                spin_lock(&nd->queue->xmit_lock);
 90        }
 91        lp = nd->queue;
 92        nd->queue = nd->queue->next;
 93        local_bh_disable();
 94errout:
 95        spin_unlock_irqrestore(&nd->queue_lock, flags);
 96        return lp;
 97}
 98
 99/*
100 * add a channel to a bundle
101 */
102static __inline__ void isdn_net_add_to_bundle(isdn_net_dev *nd, isdn_net_local *nlp)
103{
104        isdn_net_local *lp;
105        unsigned long flags;
106
Show full sources