ASoC: Intel: boards: reset acpi_chan_package
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 20 May 2022 21:17:12 +0000 (16:17 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 6 Jun 2022 11:35:15 +0000 (12:35 +0100)
cppcheck complains about possible tests of uninitialized 'aif_value'
members. This isn't really possible but static analysis cannot know
what ACPICA does, so make sure the acpi_chan_package structure is
reset prior to use to make the warning go away.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220520211719.607543-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bytcr_rt5640.c
sound/soc/intel/boards/bytcr_rt5651.c
sound/soc/intel/boards/cht_bsw_rt5645.c

index ed9fa17..2371927 100644 (file)
@@ -1636,7 +1636,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
                 * with the codec driver/pdata are non-existent
                 */
 
-               struct acpi_chan_package chan_package;
+               struct acpi_chan_package chan_package = { 0 };
 
                /* format specified: 2 64-bit integers */
                struct acpi_buffer format = {sizeof("NN"), "NN"};
index d467fca..03a52b1 100644 (file)
@@ -952,7 +952,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
                 * with the codec driver/pdata are non-existent
                 */
 
-               struct acpi_chan_package chan_package;
+               struct acpi_chan_package chan_package = { 0 };
 
                /* format specified: 2 64-bit integers */
                struct acpi_buffer format = {sizeof("NN"), "NN"};
index 45c301e..4532813 100644 (file)
@@ -603,7 +603,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
                 * with the codec driver/pdata are non-existent
                 */
 
-               struct acpi_chan_package chan_package;
+               struct acpi_chan_package chan_package = { 0 };
 
                /* format specified: 2 64-bit integers */
                struct acpi_buffer format = {sizeof("NN"), "NN"};