aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/spitz.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/pxa/spitz.c')
-rw-r--r--sound/soc/pxa/spitz.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c
index 1aafd8c645a1..6ca9f53080c6 100644
--- a/sound/soc/pxa/spitz.c
+++ b/sound/soc/pxa/spitz.c
@@ -278,7 +278,7 @@ static const struct snd_kcontrol_new wm8750_spitz_controls[] = {
278 */ 278 */
279static int spitz_wm8750_init(struct snd_soc_codec *codec) 279static int spitz_wm8750_init(struct snd_soc_codec *codec)
280{ 280{
281 int i, err; 281 int err;
282 282
283 /* NC codec pins */ 283 /* NC codec pins */
284 snd_soc_dapm_nc_pin(codec, "RINPUT1"); 284 snd_soc_dapm_nc_pin(codec, "RINPUT1");
@@ -290,12 +290,10 @@ static int spitz_wm8750_init(struct snd_soc_codec *codec)
290 snd_soc_dapm_nc_pin(codec, "MONO1"); 290 snd_soc_dapm_nc_pin(codec, "MONO1");
291 291
292 /* Add spitz specific controls */ 292 /* Add spitz specific controls */
293 for (i = 0; i < ARRAY_SIZE(wm8750_spitz_controls); i++) { 293 err = snd_soc_add_controls(codec, wm8750_spitz_controls,
294 err = snd_ctl_add(codec->card, 294 ARRAY_SIZE(wm8750_spitz_controls));
295 snd_soc_cnew(&wm8750_spitz_controls[i], codec, NULL)); 295 if (err < 0)
296 if (err < 0) 296 return err;
297 return err;
298 }
299 297
300 /* Add spitz specific widgets */ 298 /* Add spitz specific widgets */
301 snd_soc_dapm_new_controls(codec, wm8750_dapm_widgets, 299 snd_soc_dapm_new_controls(codec, wm8750_dapm_widgets,