aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra/tegra_rt5640.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-06-01 13:01:13 +0100
committerMark Brown <broonie@kernel.org>2020-06-01 13:01:13 +0100
commita72ff08faf3d6b2a1c21c9b815bf02af44cc70ab (patch)
tree5d9292f82ef7a236930febee51373565e1842398 /sound/soc/tegra/tegra_rt5640.c
parentLinux 5.7-rc7 (diff)
parentASoC: dapm: Move dai_link widgets to runtime to fix use after free (diff)
downloadlinux-dev-a72ff08faf3d6b2a1c21c9b815bf02af44cc70ab.tar.xz
linux-dev-a72ff08faf3d6b2a1c21c9b815bf02af44cc70ab.zip
Merge remote-tracking branch 'asoc/for-5.7' into asoc-linus
Diffstat (limited to 'sound/soc/tegra/tegra_rt5640.c')
-rw-r--r--sound/soc/tegra/tegra_rt5640.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/sound/soc/tegra/tegra_rt5640.c b/sound/soc/tegra/tegra_rt5640.c
index 9878bc3eb89e..201d132731f9 100644
--- a/sound/soc/tegra/tegra_rt5640.c
+++ b/sound/soc/tegra/tegra_rt5640.c
@@ -164,19 +164,18 @@ static int tegra_rt5640_probe(struct platform_device *pdev)
ret = snd_soc_of_parse_card_name(card, "nvidia,model");
if (ret)
- goto err;
+ return ret;
ret = snd_soc_of_parse_audio_routing(card, "nvidia,audio-routing");
if (ret)
- goto err;
+ return ret;
tegra_rt5640_dai.codecs->of_node = of_parse_phandle(np,
"nvidia,audio-codec", 0);
if (!tegra_rt5640_dai.codecs->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,audio-codec' missing or invalid\n");
- ret = -EINVAL;
- goto err;
+ return -EINVAL;
}
tegra_rt5640_dai.cpus->of_node = of_parse_phandle(np,
@@ -184,40 +183,31 @@ static int tegra_rt5640_probe(struct platform_device *pdev)
if (!tegra_rt5640_dai.cpus->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,i2s-controller' missing or invalid\n");
- ret = -EINVAL;
- goto err;
+ return -EINVAL;
}
tegra_rt5640_dai.platforms->of_node = tegra_rt5640_dai.cpus->of_node;
ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
if (ret)
- goto err;
+ return ret;
ret = snd_soc_register_card(card);
if (ret) {
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
ret);
- goto err_fini_utils;
+ return ret;
}
return 0;
-
-err_fini_utils:
- tegra_asoc_utils_fini(&machine->util_data);
-err:
- return ret;
}
static int tegra_rt5640_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
- struct tegra_rt5640 *machine = snd_soc_card_get_drvdata(card);
snd_soc_unregister_card(card);
- tegra_asoc_utils_fini(&machine->util_data);
-
return 0;
}