]> Git Repo - linux.git/commitdiff
ASoC: wm9712: Use empty struct initializer
authorFabio Estevam <[email protected]>
Tue, 13 Feb 2018 19:37:50 +0000 (17:37 -0200)
committerMark Brown <[email protected]>
Wed, 14 Feb 2018 11:31:29 +0000 (11:31 +0000)
{ 0 } only clears the first member of the structure.

The first member of the snd_soc_dapm_update struct is a pointer,
and writing 0 to a pointer results in the following sparse warning:

sound/soc/codecs/wm9712.c:229:47: warning: Using plain integer as NULL pointer

Use the empty struct initializer that clears all the struct members
and fixes the sparse warning.

Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
sound/soc/codecs/wm9712.c

index 4f6d1a442bc448e35cf28e365e93071a9270bfc4..c672d5d88827c18db517e08d0cb768784cf8b0b2 100644 (file)
@@ -226,7 +226,7 @@ static int wm9712_hp_mixer_put(struct snd_kcontrol *kcontrol,
        struct soc_mixer_control *mc =
                (struct soc_mixer_control *)kcontrol->private_value;
        unsigned int mixer, mask, shift, old;
-       struct snd_soc_dapm_update update = { 0 };
+       struct snd_soc_dapm_update update = {};
        bool change;
 
        mixer = mc->shift >> 8;
This page took 0.101775 seconds and 4 git commands to generate.