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

Takashi Iwai tiwai at suse.de
Mon Nov 11 18:20:17 CET 2019


On Mon, 11 Nov 2019 18:16:25 +0100,
RAVULAPATI, VISHNU VARDHAN RAO wrote:
> 
> > +             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?
> 
> I have not faced any issue of compilation.
> Can I know what is wrong with it please so that it can be re checked.

The "if" is missing around IS_ERR() in the above line.
It should have been
			if (IS_ERR(adata->pdev[i])) {
				.....


It's interesting the code didn't give any compile warning or error,
indeed.


thanks,

Takashi


More information about the Alsa-devel mailing list