Showing error 1562

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: 741
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 711                if (res < 0)
 712                        goto _unlock;
 713        }
 714        snd_pcm_group_for_each_entry(s, substream) {
 715                res = ops->do_action(s, state);
 716                if (res < 0) {
 717                        if (ops->undo_action) {
 718                                snd_pcm_group_for_each_entry(s1, substream) {
 719                                        if (s1 == s) /* failed stream */
 720                                                break;
 721                                        ops->undo_action(s1, state);
 722                                }
 723                        }
 724                        s = NULL; /* unlock all */
 725                        goto _unlock;
 726                }
 727        }
 728        snd_pcm_group_for_each_entry(s, substream) {
 729                ops->post_action(s, state);
 730        }
 731 _unlock:
 732        if (do_lock) {
 733                /* unlock streams */
 734                snd_pcm_group_for_each_entry(s1, substream) {
 735                        if (s1 != substream)
 736                                spin_unlock(&s1->self_group.lock);
 737                        if (s1 == s)        /* end */
 738                                break;
 739                }
 740        }
 741        return res;
 742}
 743
 744/*
 745 *  Note: call with stream lock
 746 */
 747static int snd_pcm_action_single(struct action_ops *ops,
 748                                 struct snd_pcm_substream *substream,
 749                                 int state)
 750{
 751        int res;
Show full sources