ASoC: tegra: remove compilation warning
Juha Tukkinen [Wed, 30 May 2012 14:04:48 +0000 (17:04 +0300)]
Ensure i2s_client_bits and i2s_audio_bits do not get used
uninitialized.

Bug 949219

Change-Id: Ibdd7f2598278639388d2c2afb5843f2471375ea2
Signed-off-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-on: http://git-master/r/105426
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sanjay Singh Rawat <srawat@nvidia.com>

sound/soc/tegra/tegra30_i2s.c

index 4493598..8be00b8 100644 (file)
@@ -418,6 +418,10 @@ static int tegra30_i2s_tdm_hw_params(struct snd_pcm_substream *substream,
                i2s_client_bits = TEGRA30_AUDIOCIF_BITS_32;
                i2s->reg_ctrl |= TEGRA30_I2S_CTRL_BIT_SIZE_32;
                break;
+       default:
+               dev_err(dev, "unknown slot_width %d\n",
+                               i2s->dsp_config.slot_width);
+               return -EINVAL;
        }
 
        val = (0 << TEGRA30_AUDIOCIF_CTRL_FIFO_THRESHOLD_SHIFT) |