Showing error 1033

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: sound/core/pcm_native.c
Line in file: 784
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

 754        if (res < 0)
 755                return res;
 756        res = ops->do_action(substream, state);
 757        if (res == 0)
 758                ops->post_action(substream, state);
 759        else if (ops->undo_action)
 760                ops->undo_action(substream, state);
 761        return res;
 762}
 763
 764/*
 765 *  Note: call with stream lock
 766 */
 767static int snd_pcm_action(struct action_ops *ops,
 768                          struct snd_pcm_substream *substream,
 769                          int state)
 770{
 771        int res;
 772
 773        if (snd_pcm_stream_linked(substream)) {
 774                if (!spin_trylock(&substream->group->lock)) {
 775                        spin_unlock(&substream->self_group.lock);
 776                        spin_lock(&substream->group->lock);
 777                        spin_lock(&substream->self_group.lock);
 778                }
 779                res = snd_pcm_action_group(ops, substream, state, 1);
 780                spin_unlock(&substream->group->lock);
 781        } else {
 782                res = snd_pcm_action_single(ops, substream, state);
 783        }
 784        return res;
 785}
 786
 787/*
 788 *  Note: don't use any locks before
 789 */
 790static int snd_pcm_action_lock_irq(struct action_ops *ops,
 791                                   struct snd_pcm_substream *substream,
 792                                   int state)
 793{
 794        int res;
Show full sources