Skip to content

Commit 379bcd2

Browse files
vijendarmukundabroonie
authored andcommitted
ASoC: amd: acp: move chip->flag variable assignment
chip->flag variable assignment will be skipped when acp platform device creation is skipped. In this case chip>flag value will not be set. chip->flag variable should be assigned along with other structure variables for 'chip' structure. Move chip->flag variable assignment prior to acp platform device creation. Fixes: 3a94c8a ("ASoC: amd: acp: add code for scanning acp pdm controller") Signed-off-by: Vijendar Mukunda <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 70fa390 commit 379bcd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/amd/acp/acp-pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
100100
ret = -EINVAL;
101101
goto release_regions;
102102
}
103+
chip->flag = flag;
103104
dmic_dev = platform_device_register_data(dev, "dmic-codec", PLATFORM_DEVID_NONE, NULL, 0);
104105
if (IS_ERR(dmic_dev)) {
105106
dev_err(dev, "failed to create DMIC device\n");
@@ -139,7 +140,6 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
139140
}
140141
}
141142

142-
chip->flag = flag;
143143
memset(&pdevinfo, 0, sizeof(pdevinfo));
144144

145145
pdevinfo.name = chip->name;

0 commit comments

Comments
 (0)