[alsa-devel] [PATCH] ASoC: tegra: fix uninitialized variables in set_fmt
Thierry Reding
thierry.reding at gmail.com
Fri Dec 6 22:07:11 CET 2013
On Fri, Dec 06, 2013 at 01:34:50PM -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren at nvidia.com>
>
> 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.
>
> Cc: <stable at vger.kernel.org>
> Fixes: 0f163546a772 ("ASoC: tegra: use regmap more directly")
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> ---
> sound/soc/tegra/tegra20_i2s.c | 6 +++---
> sound/soc/tegra/tegra20_spdif.c | 10 +++++-----
> sound/soc/tegra/tegra30_i2s.c | 6 +++---
> 3 files changed, 11 insertions(+), 11 deletions(-)
Reviewed-by: Thierry Reding <treding at nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20131206/73b24665/attachment.sig>
More information about the Alsa-devel
mailing list