/* Returns 0 for success else error. On error all resources can be freed with a call to snd_soc_card_free().  */
int snd_soc_dapm_add_routes(struct snd_soc_codec *codec, const struct snd_soc_dapm_route *route, int num)
/* Returns 0 for success else error. On error all resources can be freed with a call to snd_soc_card_free().  */
int snd_soc_dapm_add_routes(struct snd_soc_codec *codec, const struct snd_soc_dapm_route *route, int num)
{
	int i, ret;
	for (i = 0; i < num; i++) {
		ret = snd_soc_dapm_add_route(codec, route);
		if (ret < 0) {
			printk(KERN_ERR "Failed to add route %s->%s\n",
			       route->source,
			       route->sink);
			return ret;
		}
		route++;
	}
	return 0;
}