Re: [alsa-devel] [RESEND PATCH v4 1/6] ASoC: amd:Create multiple I2S platform device Endpoint

From: Pierre-Louis Bossart
Date: Mon Nov 11 2019 - 11:41:23 EST



+ pdevinfo[2].name = "acp3x_i2s_playcap";
+ pdevinfo[2].id = 1;
+ pdevinfo[2].parent = &pci->dev;
+ pdevinfo[2].num_res = 1;
+ pdevinfo[2].res = &adata->res[2];
+ for (i = 0; i < ACP3x_DEVS ; i++) {
+ adata->pdev[i] =
+ platform_device_register_full(&pdevinfo[i]);
+ IS_ERR(adata->pdev[i]) {

how does this even compile?

+ dev_err(&pci->dev, "cannot register %s device\n",
+ pdevinfo[i].name);
+ ret = -ENODEV;
+ goto unmap_mmio;
+ }