[PATCH] ASoC: da7219: Fix general protection fault in da7219_register_dai_clks

Mark Brown broonie at kernel.org
Thu Jul 30 18:28:08 CEST 2020


On Thu, Jul 30, 2020 at 04:19:01PM +0000, Adam Thomson wrote:
> On 30 July 2020 17:06, Yong Zhi wrote:

> > When the card was uninstalled with modprobe -r, the da7219 codec was not
> > removed, only component da7219_remove() is invoked, do you suggest the
> > component driver probe and remove has to happen with da7219_i2_driver probe
> > and remove together? Thanks for the code review.

> Well as far as I understand it the the devm_* allocated resources are tied to
> the i2c dev. If I'm correct then unless that's removed then those resources
> won't be freed. If this is a valid scenario then we would probably have to look
> at avoiding all devm_ calls in the da7219_probe() code as they wouldn't be
> released when doing what you are here.

> Mark, what's your take on this? Am I missing something obvious?

You're not missing anything, you shouldn't be doing devm allocations at
the CODEC level only at the device model level.  I'm somewhat confused
why you would be registering clocks at the device model level TBH.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 484 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20200730/c707b53f/attachment.sig>


More information about the Alsa-devel mailing list