Skip to content

Commit 7a6a723

Browse files
tititiou36broonie
authored andcommitted
ASoC: wcd9335: Fix a double irq free in the remove function
There is no point in calling 'free_irq()' explicitly for 'WCD9335_IRQ_SLIMBUS' in the remove function. The irqs are requested in 'wcd9335_setup_irqs()' using a resource managed function (i.e. 'devm_request_threaded_irq()'). 'wcd9335_setup_irqs()' requests all what is defined in the 'wcd9335_irqs' structure. This structure has only one entry for 'WCD9335_IRQ_SLIMBUS'. So 'devm_request...irq()' + explicit 'free_irq()' would lead to a double free. Remove the unneeded 'free_irq()' from the remove function. Fixes: 20aedaf ("ASoC: wcd9335: add support to wcd9335 codec") Signed-off-by: Christophe JAILLET <[email protected]> Message-Id: <0614d63bc00edd7e81dd367504128f3d84f72efa.1629091028.git.christophe.jaillet@wanadoo.fr> Signed-off-by: Mark Brown <[email protected]>
1 parent 515b436 commit 7a6a723

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

sound/soc/codecs/wcd9335.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4869,7 +4869,6 @@ static void wcd9335_codec_remove(struct snd_soc_component *comp)
48694869
struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev);
48704870

48714871
wcd_clsh_ctrl_free(wcd->clsh_ctrl);
4872-
free_irq(regmap_irq_get_virq(wcd->irq_data, WCD9335_IRQ_SLIMBUS), wcd);
48734872
}
48744873

48754874
static int wcd9335_codec_set_sysclk(struct snd_soc_component *comp,

0 commit comments

Comments
 (0)