Skip to content

Commit da9b930

Browse files
rjarzmikbroonie
authored andcommitted
ASoC: wm9713: fix regmap free path
In the conversion to regmap, I assumed that the devm_() variant could be used in the soc probe function. As a mater of fact with the current code the regmap is freed twice because of the devm_() call: (mutex_lock) from [<c01f6624>] (debugfs_remove_recursive+0x50/0x1d0) (debugfs_remove_recursive) from [<c02bf800>] (regmap_debugfs_exit+0x1c/0xd4) (regmap_debugfs_exit) from [<c02ba1f8>] (regmap_exit+0x28/0xc8) (regmap_exit) from [<c02aa258>] (release_nodes+0x18c/0x204) (release_nodes) from [<c02a278c>] (device_release+0x18/0x90) (device_release) from [<c0239030>] (kobject_release+0x90/0x1bc) (kobject_release) from [<c0395c94>] (wm9713_soc_remove+0x1c/0x24) (wm9713_soc_remove) from [<c0384884>] (soc_remove_component+0x50/0x7c) (soc_remove_component) from [<c0386c28>] (soc_remove_dai_links+0x118/0x228) (soc_remove_dai_links) from [<c038721c>] (snd_soc_register_card+0x4e4/0xdd4) (snd_soc_register_card) from [<c0393c54>] (devm_snd_soc_register_card+0x34/0x70) Fix this by replacing the devm_regmap initialization code with the non devm_() variant. Fixes: 700dadf ASoC: wm9713: convert to regmap Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 92e963f commit da9b930

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/codecs/wm9713.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec)
12121212
if (IS_ERR(wm9713->ac97))
12131213
return PTR_ERR(wm9713->ac97);
12141214

1215-
regmap = devm_regmap_init_ac97(wm9713->ac97, &wm9713_regmap_config);
1215+
regmap = regmap_init_ac97(wm9713->ac97, &wm9713_regmap_config);
12161216
if (IS_ERR(regmap)) {
12171217
snd_soc_free_ac97_codec(wm9713->ac97);
12181218
return PTR_ERR(regmap);

0 commit comments

Comments
 (0)