aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/sh/rcar/core.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index c48d999a3fce..f07742f1eb11 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1043,11 +1043,11 @@ static int rsnd_probe(struct platform_device *pdev)
1043 for_each_rsnd_dai(rdai, priv, i) { 1043 for_each_rsnd_dai(rdai, priv, i) {
1044 ret = rsnd_dai_call(probe, &rdai->playback, rdai); 1044 ret = rsnd_dai_call(probe, &rdai->playback, rdai);
1045 if (ret) 1045 if (ret)
1046 return ret; 1046 goto exit_snd_probe;
1047 1047
1048 ret = rsnd_dai_call(probe, &rdai->capture, rdai); 1048 ret = rsnd_dai_call(probe, &rdai->capture, rdai);
1049 if (ret) 1049 if (ret)
1050 return ret; 1050 goto exit_snd_probe;
1051 } 1051 }
1052 1052
1053 /* 1053 /*
@@ -1075,6 +1075,11 @@ static int rsnd_probe(struct platform_device *pdev)
1075 1075
1076exit_snd_soc: 1076exit_snd_soc:
1077 snd_soc_unregister_platform(dev); 1077 snd_soc_unregister_platform(dev);
1078exit_snd_probe:
1079 for_each_rsnd_dai(rdai, priv, i) {
1080 rsnd_dai_call(remove, &rdai->playback, rdai);
1081 rsnd_dai_call(remove, &rdai->capture, rdai);
1082 }
1078 1083
1079 return ret; 1084 return ret;
1080} 1085}
@@ -1083,21 +1088,16 @@ static int rsnd_remove(struct platform_device *pdev)
1083{ 1088{
1084 struct rsnd_priv *priv = dev_get_drvdata(&pdev->dev); 1089 struct rsnd_priv *priv = dev_get_drvdata(&pdev->dev);
1085 struct rsnd_dai *rdai; 1090 struct rsnd_dai *rdai;
1086 int ret, i; 1091 int ret = 0, i;
1087 1092
1088 pm_runtime_disable(&pdev->dev); 1093 pm_runtime_disable(&pdev->dev);
1089 1094
1090 for_each_rsnd_dai(rdai, priv, i) { 1095 for_each_rsnd_dai(rdai, priv, i) {
1091 ret = rsnd_dai_call(remove, &rdai->playback, rdai); 1096 ret |= rsnd_dai_call(remove, &rdai->playback, rdai);
1092 if (ret) 1097 ret |= rsnd_dai_call(remove, &rdai->capture, rdai);
1093 return ret;
1094
1095 ret = rsnd_dai_call(remove, &rdai->capture, rdai);
1096 if (ret)
1097 return ret;
1098 } 1098 }
1099 1099
1100 return 0; 1100 return ret;
1101} 1101}
1102 1102
1103static struct platform_driver rsnd_driver = { 1103static struct platform_driver rsnd_driver = {