On Thu, Mar 28, 2019 at 02:17:32PM +0100, Christian Gromm wrote: > +static int audio_create_sound_card(void) > +{ > + int ret; > + struct sound_adapter *adpt; > + > + list_for_each_entry(adpt, &adpt_list, list) { > + if (!adpt->registered) > + goto adpt_alloc; > + } > + return -ENODEV; > +adpt_alloc: > + ret = snd_card_register(adpt->card); > + if (ret < 0) { > + release_adapter(adpt); > + return ret; > + } > + adpt->registered = true; > + return ret; ^^^^^^^^^^ return 0; > +} This function is just strange to me... We add a bunch of adapters to "adpt_list" in audio_probe_channel(). Each adapter has it's own adpt->card. But here we just take the first unregistered adapter and register it as our card. regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel