summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/tegra/tegra_aic326x.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra_aic326x.c b/sound/soc/tegra/tegra_aic326x.c
index 26c5f18d0dc9..b64ab41c97d0 100644
--- a/sound/soc/tegra/tegra_aic326x.c
+++ b/sound/soc/tegra/tegra_aic326x.c
@@ -884,7 +884,7 @@ static __devinit int tegra_aic326x_driver_probe(struct platform_device *pdev)
if (ret) {
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
ret);
- goto err_fini_utils;
+ goto err_switch_unregister;
}
if (!card->instantiated) {
@@ -896,6 +896,10 @@ static __devinit int tegra_aic326x_driver_probe(struct platform_device *pdev)
err_unregister_card:
snd_soc_unregister_card(card);
+err_switch_unregister:
+#ifdef CONFIG_SWITCH
+ switch_dev_unregister(&aic326x_wired_switch_dev);
+#endif
err_fini_utils:
tegra_asoc_utils_fini(&machine->util_data);
err_free_machine: