Patch "ASoC: mchp-spdifrx: Fix uninitialized use of mr in mchp_spdifrx_hw_params()" has been added to the 5.10-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    ASoC: mchp-spdifrx: Fix uninitialized use of mr in mchp_spdifrx_hw_params()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-mchp-spdifrx-fix-uninitialized-use-of-mr-in-mch.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit be299a6824ef07814901cf7b0c34b930ad4f5139
Author: Nathan Chancellor <nathan@xxxxxxxxxx>
Date:   Thu Feb 2 09:34:19 2023 -0700

    ASoC: mchp-spdifrx: Fix uninitialized use of mr in mchp_spdifrx_hw_params()
    
    [ Upstream commit 218674a45930c700486d27b765bf2f1b43f8cbf7 ]
    
    Clang warns:
    
      ../sound/soc/atmel/mchp-spdifrx.c:455:3: error: variable 'mr' is uninitialized when used here [-Werror,-Wuninitialized]
                      mr |= SPDIFRX_MR_ENDIAN_BIG;
                      ^~
      ../sound/soc/atmel/mchp-spdifrx.c:432:8: note: initialize the variable 'mr' to silence this warning
              u32 mr;
                    ^
                     = 0
      1 error generated.
    
    Zero initialize mr so that these bitwise OR and assignment operation
    works unconditionally.
    
    Fixes: fa09fa60385a ("ASoC: mchp-spdifrx: fix controls which rely on rsr register")
    Link: https://github.com/ClangBuiltLinux/linux/issues/1797
    Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
    Reviewed-by: Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230202-mchp-spdifrx-fix-uninit-mr-v1-1-629a045d7a2f@xxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/atmel/mchp-spdifrx.c b/sound/soc/atmel/mchp-spdifrx.c
index 03b7037239b85..39a3c2a33bdbb 100644
--- a/sound/soc/atmel/mchp-spdifrx.c
+++ b/sound/soc/atmel/mchp-spdifrx.c
@@ -362,7 +362,7 @@ static int mchp_spdifrx_hw_params(struct snd_pcm_substream *substream,
 				  struct snd_soc_dai *dai)
 {
 	struct mchp_spdifrx_dev *dev = snd_soc_dai_get_drvdata(dai);
-	u32 mr;
+	u32 mr = 0;
 	int ret;
 
 	dev_dbg(dev->dev, "%s() rate=%u format=%#x width=%u channels=%u\n",



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux