ASoC: tegra: fix uninitialized variables in set_fmt
authorStephen Warren <swarren@nvidia.com>
Fri, 6 Dec 2013 20:34:50 +0000 (13:34 -0700)
committerMark Brown <broonie@linaro.org>
Mon, 9 Dec 2013 17:14:32 +0000 (17:14 +0000)
In tegra*_i2s_set_fmt(), in the (fmt == SND_SOC_DAIFMT_CBM_CFM) case,
"val" is never assigned to, but left uninitialized. The other case does
initialized it. Fix this by initializing val at the start of the
function, and only ever ORing into it.

Update the handling of "mask" so it works the same way for consistency.

Update tegra20_spdif.c to use the same code-style for consistency, even
though it doesn't happen to suffer from the same problem at present.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Fixes: 0f163546a772 ("ASoC: tegra: use regmap more directly")
Cc: <stable@vger.kernel.org>

No differences found