Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f87a3e82 authored by Xiubo Li's avatar Xiubo Li Committed by Mark Brown
Browse files

ASoC: simple-card: fix the DAPM routes map parsing



The simple-card's DAPM route maping is optional.

Signed-off-by: default avatarXiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent e2a19ac6
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -134,10 +134,12 @@ static int asoc_simple_card_parse_of(struct device_node *node,
		(SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
		(SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);


	/* DAPM routes */
	/* DAPM routes */
	if (of_property_read_bool(node, "simple-audio-routing")) {
		ret = snd_soc_of_parse_audio_routing(&info->snd_card,
		ret = snd_soc_of_parse_audio_routing(&info->snd_card,
					"simple-audio-routing");
					"simple-audio-routing");
		if (ret)
		if (ret)
			return ret;
			return ret;
	}


	/* CPU sub-node */
	/* CPU sub-node */
	ret = -EINVAL;
	ret = -EINVAL;