Skip to content

Commit d5c137f

Browse files
Dan Carpenterbroonie
authored andcommitted
ASoC: amd: fix uninitialized variable in snd_acp6x_probe()
The "index" is potentially used without being initialized on the error path. Fixes: fc329c1 ("ASoC: amd: add platform devices for acp6x pdm driver and dmic driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20211130125633.GA24941@kili Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 53689f7 commit d5c137f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sound/soc/amd/yc/pci-acp6x.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,11 @@ static int snd_acp6x_probe(struct pci_dev *pci,
146146
{
147147
struct acp6x_dev_data *adata;
148148
struct platform_device_info pdevinfo[ACP6x_DEVS];
149-
int ret, index;
149+
int index = 0;
150150
int val = 0x00;
151151
u32 addr;
152152
unsigned int irqflags;
153+
int ret;
153154

154155
irqflags = IRQF_SHARED;
155156
/* Yellow Carp device check */

0 commit comments

Comments
 (0)