Message ID | 1343392734-11805-2-git-send-email-lee.jones@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jul 27, 2012 at 01:38:48PM +0100, Lee Jones wrote: > If a list of widgets is provided and one of them fails to be added as > a control, the present semantics fail all subsequent widgets. A better > solution would be to only fail that widget, but pursue in attempting > to add the rest of the list. You've completely ignored my question about why this is better. This is also *clearly* not an urgent bugfix.
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index eded657..7d9c154 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3095,8 +3095,6 @@ int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm, dev_err(dapm->dev, "ASoC: Failed to create DAPM control %s\n", widget->name); - ret = -ENOMEM; - break; } widget++; }
If a list of widgets is provided and one of them fails to be added as a control, the present semantics fail all subsequent widgets. A better solution would be to only fail that widget, but pursue in attempting to add the rest of the list. Signed-off-by: Lee Jones <lee.jones@linaro.org> --- sound/soc/soc-dapm.c | 2 -- 1 file changed, 2 deletions(-)