Showing error 928

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/image/mdc800.c
Line in file: 502
Project: Linux Kernel
Project version: 2.6.28
Confirmation: Fixed by 909b6c3fc20ea772dc63a03986d74148fcbb1a1d
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:17 UTC


Source:

 472        /* Check the Endpoints */
 473        for (i=0; i<4; i++)
 474        {
 475                mdc800->endpoint[i]=-1;
 476                for (j=0; j<4; j++)
 477                {
 478                        if (mdc800_endpoint_equals (&intf_desc->endpoint [j].desc,&mdc800_ed [i]))
 479                        {
 480                                mdc800->endpoint[i]=intf_desc->endpoint [j].desc.bEndpointAddress ;
 481                                if (i==1)
 482                                {
 483                                        irq_interval=intf_desc->endpoint [j].desc.bInterval;
 484                                }
 485                        }
 486                }
 487                if (mdc800->endpoint[i] == -1)
 488                {
 489                        dev_err(&intf->dev, "probe fails -> Wrong Endpoints.\n");
 490                        return -ENODEV;
 491                }
 492        }
 493
 494
 495        dev_info(&intf->dev, "Found Mustek MDC800 on USB.\n");
 496
 497        mutex_lock(&mdc800->io_lock);
 498
 499        retval = usb_register_dev(intf, &mdc800_class);
 500        if (retval) {
 501                dev_err(&intf->dev, "Not able to get a minor for this device.\n");
 502                return -ENODEV;
 503        }
 504
 505        mdc800->dev=dev;
 506        mdc800->open=0;
 507
 508        /* Setup URB Structs */
 509        usb_fill_int_urb (
 510                mdc800->irq_urb,
 511                mdc800->dev,
 512                usb_rcvintpipe (mdc800->dev,mdc800->endpoint [1]),
Show full sources