[alsa-devel] regarding references taken on platform and codec driver modules

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Jan 10 20:01:54 CET 2011

On Thu, Jan 06, 2011 at 02:41:29PM +0530, Koul, Vinod wrote:

> This issue is on removal of soc_remove() it doesn't free up the reference if the card is not instantiated
> So in case one of the probes fails we should handle this in soc_remove in else for instantated

> 		    if (rtd->codec->probed)
>                         module_put(rtd->codec->dev->driver->owner);
>                 if (rtd->platform->probed)
>                         module_put(rtd->platform->dev->driver->owner);
>                 for (i = 0; i < card->num_rtd; i++)
>                         module_put(rtd[i].cpu_dai->dev->driver->owner);

> Would this be the correct way to solve this?

Probably, yes.

More information about the Alsa-devel mailing list