[alsa-devel] soc-core: Questions about cpus->name && cpus->of_node

Daniel Baluta daniel.baluta at nxp.com
Fri Jan 17 09:32:50 CET 2020


Hello Morimoto-san,

I have a question about this snippet from sound/soc/soc-core.c

»       /*
»        * CPU device may be specified by either name or OF node, but
»        * can be left unspecified, and will be matched based on DAI
»        * name alone..
»        */
»       if (link->cpus->name && link->cpus->of_node) {
»       »       dev_err(card->dev,
»       »       »       "ASoC: Neither/both cpu name/of_node are set for %s\n",
»       »       »       link->name);
»       »       return -EINVAL;
»       }

Here either the warning message is wrong OR the if () condition is wrong.

If the link->cpus->name = NULL && link->cpus->of_node == NULL 
the warning message will be not be printed. 



More information about the Alsa-devel mailing list