Skip to content

Commit 25fb575

Browse files
committed
ASoC: Intel: boards: reset acpi_chan_package
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>
1 parent 7f3c51f commit 25fb575

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

sound/soc/intel/boards/bytcr_rt5640.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
16341634
* with the codec driver/pdata are non-existent
16351635
*/
16361636

1637-
struct acpi_chan_package chan_package;
1637+
struct acpi_chan_package chan_package = { 0 };
16381638

16391639
/* format specified: 2 64-bit integers */
16401640
struct acpi_buffer format = {sizeof("NN"), "NN"};

sound/soc/intel/boards/bytcr_rt5651.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
952952
* with the codec driver/pdata are non-existent
953953
*/
954954

955-
struct acpi_chan_package chan_package;
955+
struct acpi_chan_package chan_package = { 0 };
956956

957957
/* format specified: 2 64-bit integers */
958958
struct acpi_buffer format = {sizeof("NN"), "NN"};

sound/soc/intel/boards/cht_bsw_rt5645.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
603603
* with the codec driver/pdata are non-existent
604604
*/
605605

606-
struct acpi_chan_package chan_package;
606+
struct acpi_chan_package chan_package = { 0 };
607607

608608
/* format specified: 2 64-bit integers */
609609
struct acpi_buffer format = {sizeof("NN"), "NN"};

0 commit comments

Comments
 (0)