Skip to content

Commit 60edb20

Browse files
Fabio Estevambroonie
authored andcommitted
ASoC: wm9712: Use empty struct initializer
{ 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]>
1 parent 7928b2c commit 60edb20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/codecs/wm9712.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static int wm9712_hp_mixer_put(struct snd_kcontrol *kcontrol,
226226
struct soc_mixer_control *mc =
227227
(struct soc_mixer_control *)kcontrol->private_value;
228228
unsigned int mixer, mask, shift, old;
229-
struct snd_soc_dapm_update update = { 0 };
229+
struct snd_soc_dapm_update update = {};
230230
bool change;
231231

232232
mixer = mc->shift >> 8;

0 commit comments

Comments
 (0)