Re: [PATCH] ASoC: tegra: fix uninitialized variables in set_fmt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 06, 2013 at 01:34:50PM -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren@xxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxx>
> Fixes: 0f163546a772 ("ASoC: tegra: use regmap more directly")
> Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxx>

Attachment: pgpAV0hqESE0U.pgp
Description: PGP signature


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux