diff options
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index f013b24c050a..2790c00735f3 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -1157,8 +1157,8 @@ static __always_inline int is_connected_ep(struct snd_soc_dapm_widget *widget, | |||
1157 | list_add_tail(&widget->work_list, list); | 1157 | list_add_tail(&widget->work_list, list); |
1158 | 1158 | ||
1159 | if (custom_stop_condition && custom_stop_condition(widget, dir)) { | 1159 | if (custom_stop_condition && custom_stop_condition(widget, dir)) { |
1160 | widget->endpoints[dir] = 1; | 1160 | list = NULL; |
1161 | return widget->endpoints[dir]; | 1161 | custom_stop_condition = NULL; |
1162 | } | 1162 | } |
1163 | 1163 | ||
1164 | if ((widget->is_ep & SND_SOC_DAPM_DIR_TO_EP(dir)) && widget->connected) { | 1164 | if ((widget->is_ep & SND_SOC_DAPM_DIR_TO_EP(dir)) && widget->connected) { |
@@ -1195,8 +1195,8 @@ static __always_inline int is_connected_ep(struct snd_soc_dapm_widget *widget, | |||
1195 | * | 1195 | * |
1196 | * Optionally, can be supplied with a function acting as a stopping condition. | 1196 | * Optionally, can be supplied with a function acting as a stopping condition. |
1197 | * This function takes the dapm widget currently being examined and the walk | 1197 | * This function takes the dapm widget currently being examined and the walk |
1198 | * direction as an arguments, it should return true if the walk should be | 1198 | * direction as an arguments, it should return true if widgets from that point |
1199 | * stopped and false otherwise. | 1199 | * in the graph onwards should not be added to the widget list. |
1200 | */ | 1200 | */ |
1201 | static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, | 1201 | static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, |
1202 | struct list_head *list, | 1202 | struct list_head *list, |
@@ -3706,6 +3706,8 @@ request_failed: | |||
3706 | dev_err(dapm->dev, "ASoC: Failed to request %s: %d\n", | 3706 | dev_err(dapm->dev, "ASoC: Failed to request %s: %d\n", |
3707 | w->name, ret); | 3707 | w->name, ret); |
3708 | 3708 | ||
3709 | kfree_const(w->sname); | ||
3710 | kfree(w); | ||
3709 | return ERR_PTR(ret); | 3711 | return ERR_PTR(ret); |
3710 | } | 3712 | } |
3711 | 3713 | ||