diff mbox series

[V2,2/2] ASoC: amd: acp: move chip->flag variable assignment

Message ID 20240503120306.4300-2-Vijendar.Mukunda@amd.com
State New
Headers show
Series [V2,1/2] ASoC: amd: acp: fix for acp platform device creation failure | expand

Commit Message

Mukunda,Vijendar May 3, 2024, 12:02 p.m. UTC
chip->flag variable should be assigned along with other structure
variables for 'chip' structure. Move the variable assignment.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/acp-pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c
index d8314d2b331b..b70b3ae33df7 100644
--- a/sound/soc/amd/acp/acp-pci.c
+++ b/sound/soc/amd/acp/acp-pci.c
@@ -101,6 +101,7 @@  static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
 		goto release_regions;
 	}
 
+	chip->flag = flag;
 	dmic_dev = platform_device_register_data(dev, "dmic-codec", PLATFORM_DEVID_NONE, NULL, 0);
 	if (IS_ERR(dmic_dev)) {
 		dev_err(dev, "failed to create DMIC device\n");
@@ -140,7 +141,6 @@  static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
 		}
 	}
 
-	chip->flag = flag;
 	memset(&pdevinfo, 0, sizeof(pdevinfo));
 
 	pdevinfo.name = chip->name;