ASoC: topology: use break on errors, not continue
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 7 Jul 2020 20:37:47 +0000 (15:37 -0500)
committerMark Brown <broonie@kernel.org>
Wed, 8 Jul 2020 13:25:20 +0000 (14:25 +0100)
commit129fc2ba01c8322575173cc97afa324e54a5d4ce
tree7a026d8edea664d143d46aefc9658fb3ba5eca81
parent8edac489e7c3fce44208373bb3e7b5835a672c66
ASoC: topology: use break on errors, not continue

Since the beginning of the topology, the code continues to the next
object even when an error is detected.

The topology should be handled with an all-or-nothing design, loading
a partially valid topology is a sure way to get bug reports that are
difficult to deal with.

Changing the behavior may break previous solutions and expose problems
in topology files delivered in the past, so it's probably not wise to
add this patch to stable branches without revalidation.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200707203749.113883-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c