Hi Rob Thank you for your review. > > +int asoc_simple_card_parse_graph_dai(struct device_node *ep, > > + struct device_node **dai_of_node, > > + const char **dai_name) > > +{ > > + struct device_node *node; > > + struct of_phandle_args args; > > + int ret; > > + > > + if (!ep) > > + return 0; > > + if (!dai_name) > > + return 0; > > + > > + /* > > + * of_graph_get_port_parent() will call > > + * of_node_put(). So, call of_node_get() here > > + */ > > + of_node_get(ep); > > + node = of_graph_get_port_parent(ep); > > + > > + /* Get dai->name */ > > + args.np = node; > > + args.args[0] = snd_soc_get_dai_id(ep); > > + args.args_count = (of_graph_get_endpoint_count(node) > 1); > > This is a bit pointless. It's not the kernel's job to validate the DT. > If you don't have a graph, then of_graph_get_port_parent would have > already failed. This function will be called from graph base driver, thus, it should have port parent. args.args_count is checking <&xxxx> or <&xxxx n> Best regards --- Kuninori Morimoto -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html