Showing error 1051

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/char/ip2/i2lib.c
Line in file: 770
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

 740        }
 741        // Updates the index, and post the need for service. When adding these to
 742        // the queue of channels, we turn off the interrupt while doing so,
 743        // because at interrupt level we might want to push a channel back to the
 744        // end of the queue.
 745        switch(type)
 746        {
 747        case PTYPE_INLINE:
 748                pCh->Obuf_stuff = stuffIndex;  // Store buffer pointer
 749                write_unlock_irqrestore(&pCh->Obuf_spinlock, flags);
 750
 751                pB->debugInlineQueued++;
 752                // Add the channel pointer to list of channels needing service (first
 753                // come...), if it's not already there.
 754                i2QueueNeeds(pB, pCh, NEED_INLINE);
 755                break;
 756
 757        case PTYPE_BYPASS:
 758                pCh->Cbuf_stuff = stuffIndex;  // Store buffer pointer
 759                write_unlock_irqrestore(&pCh->Cbuf_spinlock, flags);
 760
 761                pB->debugBypassQueued++;
 762                // Add the channel pointer to list of channels needing service (first
 763                // come...), if it's not already there.
 764                i2QueueNeeds(pB, pCh, NEED_BYPASS);
 765                break;
 766        }
 767
 768        ip2trace (CHANN, ITRC_QUEUE, ITRC_RETURN, 1, nCommands );
 769
 770        return nCommands; // Good status: number of commands sent
 771}
 772
 773//******************************************************************************
 774// Function:   i2GetStatus(pCh,resetBits)
 775// Parameters: Pointer to a channel structure
 776//             Bit map of status bits to clear
 777// Returns:    Bit map of current status bits
 778//
 779// Description:
 780// Returns the state of data set signals, and whether a break has been received,
Show full sources