[alsa-devel] [bug report] ASoC: add audio-graph-card support

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Fri May 19 02:42:15 CEST 2017


Hi Dan

Thank you for your report


>    268                  goto err;
>    269          }
>    270  
>    271          snd_soc_card_set_drvdata(card, priv);
>    272  
>    273          ret = devm_snd_soc_register_card(dev, card);
>    274          if (ret >= 0)
>    275                  return ret;
> 
> This code is confusing.  I'm pretty sure that devm_snd_soc_register_card()
> returns zero on success or negative error codes but why are we checking
> >= 0 here?

I agree, but Hmm..
It seems historical reason ?

	e512e001dafa54e5ac7244416e340750a4356b41
	(ASoC: simple-card: Fix the reference count of device nodes)
	e3c4a28b611b03d69bfbdffda985ef0dd94c2794
	(ASoC: simple-card: Fix bug of wrong decrement DT node's refcount)

Current simple-card / simple-scu-card / audio-graph-card / audio-graph-scu-card
are using same style. thus, we need to fix for these drivers.
Thanks. I will do it

Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list