Commit 2eda3cb1 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-core: avoid nested code on soc_remove_dai()

Nested code is not readable.
This patch avoid it on soc_remove_dai().
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent a6ebf4c9
...@@ -942,17 +942,18 @@ static void soc_remove_dai(struct snd_soc_dai *dai, int order) ...@@ -942,17 +942,18 @@ static void soc_remove_dai(struct snd_soc_dai *dai, int order)
{ {
int err; int err;
if (dai && dai->probed && if (!dai || !dai->probed ||
dai->driver->remove_order == order) { dai->driver->remove_order != order)
if (dai->driver->remove) { return;
err = dai->driver->remove(dai);
if (err < 0) if (dai->driver->remove) {
dev_err(dai->dev, err = dai->driver->remove(dai);
"ASoC: failed to remove %s: %d\n", if (err < 0)
dai->name, err); dev_err(dai->dev,
} "ASoC: failed to remove %s: %d\n",
dai->probed = 0; dai->name, err);
} }
dai->probed = 0;
} }
static void soc_remove_link_dais(struct snd_soc_card *card, static void soc_remove_link_dais(struct snd_soc_card *card,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment