Commit d5c137f4 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

ASoC: amd: fix uninitialized variable in snd_acp6x_probe()

The "index" is potentially used without being initialized on the error
path.

Fixes: fc329c1d ("ASoC: amd: add platform devices for acp6x pdm driver and dmic driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211130125633.GA24941@kiliSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 53689f7f
......@@ -146,10 +146,11 @@ static int snd_acp6x_probe(struct pci_dev *pci,
{
struct acp6x_dev_data *adata;
struct platform_device_info pdevinfo[ACP6x_DEVS];
int ret, index;
int index = 0;
int val = 0x00;
u32 addr;
unsigned int irqflags;
int ret;
irqflags = IRQF_SHARED;
/* Yellow Carp device check */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment