Skip to content

Commit 165bb5b

Browse files
4liceDtiwai
authored andcommitted
ALSA: hda/ca0132: Fix using plain integer as NULL pointer in add_tuning_control
The 'add_tuning_control' function initializes two pointers using the integer 0 instead of the NULL pointer, triggering sparse warnings. Replaced both instaces of '0' with 'NULL' to resolve the type mismatch and suppress the sparse warnings. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Lucy Thrun <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent d6e2c06 commit 165bb5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/pci/hda/patch_ca0132.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4385,8 +4385,8 @@ static int add_tuning_control(struct hda_codec *codec,
43854385

43864386
knew.access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
43874387
SNDRV_CTL_ELEM_ACCESS_TLV_READ;
4388-
knew.tlv.c = 0;
4389-
knew.tlv.p = 0;
4388+
knew.tlv.c = NULL;
4389+
knew.tlv.p = NULL;
43904390
switch (pnid) {
43914391
case VOICE_FOCUS:
43924392
knew.info = voice_focus_ctl_info;

0 commit comments

Comments
 (0)