Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1338517 > unrolled thread

[PATCH] ASoC: wm9713: fix regmap free path

Started byRobert Jarzmik <robert.jarzmik@free.fr>
First post2016-02-19 23:10 +0100
Last post2016-02-20 19:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ASoC: wm9713: fix regmap free path Robert Jarzmik <robert.jarzmik@free.fr> - 2016-02-19 23:10 +0100
    Re: [PATCH] ASoC: wm9713: fix regmap free path Mark Brown <broonie@kernel.org> - 2016-02-20 19:10 +0100

#1338517 — [PATCH] ASoC: wm9713: fix regmap free path

FromRobert Jarzmik <robert.jarzmik@free.fr>
Date2016-02-19 23:10 +0100
Subject[PATCH] ASoC: wm9713: fix regmap free path
Message-ID<r41po-3DD-15@gated-at.bofh.it>
In the conversion to regmap, I assumed that the 2 following functions
was working symetrically:
 - snd_soc_codec_init_regmap()
 - snd_soc_codec_exit_regmap(codec)

As a mater of fact with the current code the regmap is freed twice
because of the devm_() call:
(mutex_lock) from (debugfs_remove_recursive+0x50/0x1d0)
(debugfs_remove_recursive) from (regmap_debugfs_exit+0x1c/0xd4)
(regmap_debugfs_exit) from (regmap_exit+0x28/0xc8)
(regmap_exit) from (release_nodes+0x18c/0x204)
(release_nodes) from (device_release+0x18/0x90)
(device_release) from (kobject_release+0x90/0x1bc)
(kobject_release) from (wm9713_soc_remove+0x1c/0x24)
(wm9713_soc_remove) from (soc_remove_component+0x50/0x7c)
(soc_remove_component) from (soc_remove_dai_links+0x118/0x228)
(soc_remove_dai_links) from (snd_soc_register_card+0x4e4/0xdd4)
(snd_soc_register_card) from (devm_snd_soc_register_card+0x34/0x70)

Fix this by removing the doubled regmap free.

Fixes: 700dadfefc3d ASoC: wm9713: convert to regmap
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 sound/soc/codecs/wm9713.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
index 79e143625ac3..0242b7dcc1bb 100644
--- a/sound/soc/codecs/wm9713.c
+++ b/sound/soc/codecs/wm9713.c
@@ -1230,7 +1230,6 @@ static int wm9713_soc_remove(struct snd_soc_codec *codec)
 {
 	struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec);
 
-	snd_soc_codec_exit_regmap(codec);
 	snd_soc_free_ac97_codec(wm9713->ac97);
 	return 0;
 }
@@ -1272,3 +1271,2 @@ static int wm9713_remove(struct platform_device *pdev)
 	return 0;
 }
-- 
2.1.4

[toc] | [next] | [standalone]


#1338763

FromMark Brown <broonie@kernel.org>
Date2016-02-20 19:10 +0100
Message-ID<r4k8G-1fW-15@gated-at.bofh.it>
In reply to#1338517

[Multipart message — attachments visible in raw view] — view raw

On Fri, Feb 19, 2016 at 11:08:42PM +0100, Robert Jarzmik wrote:
> In the conversion to regmap, I assumed that the 2 following functions
> was working symetrically:

This doesn't apply against current code, please check and resend.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web