Showing error 962

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


Source:

 154        if (!sisusb->present || !sisusb->ready || !sisusb->sisusb_dev)
 155                return 0;
 156
 157        return 1;
 158}
 159
 160static struct sisusb_usb_data *
 161sisusb_get_sisusb_lock_and_check(unsigned short console)
 162{
 163        struct sisusb_usb_data *sisusb;
 164
 165        /* We can't handle console calls in non-schedulable
 166         * context due to our locks and the USB transport.
 167         * So we simply ignore them. This should only affect
 168         * some calls to printk.
 169         */
 170        if (in_atomic())
 171                return NULL;
 172
 173        if (!(sisusb = sisusb_get_sisusb(console)))
 174                return NULL;
 175
 176        mutex_lock(&sisusb->lock);
 177
 178        if (!sisusb_sisusb_valid(sisusb) ||
 179            !sisusb->havethisconsole[console]) {
 180                mutex_unlock(&sisusb->lock);
 181                return NULL;
 182        }
 183
 184        return sisusb;
 185}
 186
 187static int
 188sisusb_is_inactive(struct vc_data *c, struct sisusb_usb_data *sisusb)
 189{
 190        if (sisusb->is_gfx ||
 191            sisusb->textmodedestroyed ||
 192            c->vc_mode != KD_TEXT)
 193                return 1;
 194
Show full sources