[alsa-devel] [PATCH 1/2] ASoC: rt5645: Fix missing free_irq
Mark Brown
broonie at kernel.org
Wed Jul 8 13:14:37 CEST 2015
On Wed, Jul 08, 2015 at 04:25:50PM +0800, Koro Chen wrote:
> The driver does not free irq if snd_soc_register_codec fails.
> It does not return error when request irq failed, either.
> Fix this by using devm_request_threaded_irq(), and returns when error.
Unfortunately this isn't safe...
> - if (i2c->irq)
> - free_irq(i2c->irq, rt5645);
> -
> cancel_delayed_work_sync(&rt5645->jack_detect_work);
This work item is queued up by the interrupt handler so we need to
unregister the interrupt before we cancel any pending work otherwise
it's possible that the interrupt may fire after we cancelled the work.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150708/8dae70f7/attachment.sig>
More information about the Alsa-devel
mailing list