Skip to content

Commit 3ee0fe7

Browse files
Alexey V. Vissarionovtiwai
authored andcommitted
ALSA: hda/ca0132: minor fix for allocation size
Although the "dma_chan" pointer occupies more or equal space compared to "*dma_chan", the allocation size should use the size of variable itself. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 01ef7db ("ALSA: hda - Update CA0132 codec to load DSP firmware binary") Signed-off-by: Alexey V. Vissarionov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent acdebd8 commit 3ee0fe7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/pci/hda/patch_ca0132.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2455,7 +2455,7 @@ static int dspio_set_uint_param(struct hda_codec *codec, int mod_id,
24552455
static int dspio_alloc_dma_chan(struct hda_codec *codec, unsigned int *dma_chan)
24562456
{
24572457
int status = 0;
2458-
unsigned int size = sizeof(dma_chan);
2458+
unsigned int size = sizeof(*dma_chan);
24592459

24602460
codec_dbg(codec, " dspio_alloc_dma_chan() -- begin\n");
24612461
status = dspio_scp(codec, MASTERCONTROL, 0x20,

0 commit comments

Comments
 (0)