diff options
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r-- | sound/core/pcm_lib.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index a1707cca9c6..11446a1506d 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -223,7 +223,7 @@ static void xrun_log(struct snd_pcm_substream *substream, | |||
223 | entry->jiffies = jiffies; | 223 | entry->jiffies = jiffies; |
224 | entry->pos = pos; | 224 | entry->pos = pos; |
225 | entry->period_size = runtime->period_size; | 225 | entry->period_size = runtime->period_size; |
226 | entry->buffer_size = runtime->buffer_size;; | 226 | entry->buffer_size = runtime->buffer_size; |
227 | entry->old_hw_ptr = runtime->status->hw_ptr; | 227 | entry->old_hw_ptr = runtime->status->hw_ptr; |
228 | entry->hw_ptr_base = runtime->hw_ptr_base; | 228 | entry->hw_ptr_base = runtime->hw_ptr_base; |
229 | log->idx = (log->idx + 1) % XRUN_LOG_CNT; | 229 | log->idx = (log->idx + 1) % XRUN_LOG_CNT; |
@@ -1070,8 +1070,10 @@ int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond, | |||
1070 | struct snd_pcm_hw_rule *new; | 1070 | struct snd_pcm_hw_rule *new; |
1071 | unsigned int new_rules = constrs->rules_all + 16; | 1071 | unsigned int new_rules = constrs->rules_all + 16; |
1072 | new = kcalloc(new_rules, sizeof(*c), GFP_KERNEL); | 1072 | new = kcalloc(new_rules, sizeof(*c), GFP_KERNEL); |
1073 | if (!new) | 1073 | if (!new) { |
1074 | va_end(args); | ||
1074 | return -ENOMEM; | 1075 | return -ENOMEM; |
1076 | } | ||
1075 | if (constrs->rules) { | 1077 | if (constrs->rules) { |
1076 | memcpy(new, constrs->rules, | 1078 | memcpy(new, constrs->rules, |
1077 | constrs->rules_num * sizeof(*c)); | 1079 | constrs->rules_num * sizeof(*c)); |
@@ -1087,8 +1089,10 @@ int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond, | |||
1087 | c->private = private; | 1089 | c->private = private; |
1088 | k = 0; | 1090 | k = 0; |
1089 | while (1) { | 1091 | while (1) { |
1090 | if (snd_BUG_ON(k >= ARRAY_SIZE(c->deps))) | 1092 | if (snd_BUG_ON(k >= ARRAY_SIZE(c->deps))) { |
1093 | va_end(args); | ||
1091 | return -EINVAL; | 1094 | return -EINVAL; |
1095 | } | ||
1092 | c->deps[k++] = dep; | 1096 | c->deps[k++] = dep; |
1093 | if (dep < 0) | 1097 | if (dep < 0) |
1094 | break; | 1098 | break; |
@@ -1097,7 +1101,7 @@ int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond, | |||
1097 | constrs->rules_num++; | 1101 | constrs->rules_num++; |
1098 | va_end(args); | 1102 | va_end(args); |
1099 | return 0; | 1103 | return 0; |
1100 | } | 1104 | } |
1101 | 1105 | ||
1102 | EXPORT_SYMBOL(snd_pcm_hw_rule_add); | 1106 | EXPORT_SYMBOL(snd_pcm_hw_rule_add); |
1103 | 1107 | ||