From patchwork Fri Feb 19 22:08:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 8364551 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1D8C1C0553 for ; Fri, 19 Feb 2016 22:09:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 515EB202E9 for ; Fri, 19 Feb 2016 22:09:10 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1324820212 for ; Fri, 19 Feb 2016 22:09:09 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D005B266A2F; Fri, 19 Feb 2016 23:09:07 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 762032606F5; Fri, 19 Feb 2016 23:08:59 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id F19372667FF; Fri, 19 Feb 2016 23:08:58 +0100 (CET) Received: from smtp.smtpout.orange.fr (smtp06.smtpout.orange.fr [80.12.242.128]) by alsa0.perex.cz (Postfix) with ESMTP id CA1A12606BA for ; Fri, 19 Feb 2016 23:08:51 +0100 (CET) Received: from belgarion.home ([109.222.195.191]) by mwinf5d12 with ME id LN8n1s00848EqBx03N8nRY; Fri, 19 Feb 2016 23:08:51 +0100 X-ME-Helo: belgarion.home X-ME-Date: Fri, 19 Feb 2016 23:08:51 +0100 X-ME-IP: 109.222.195.191 From: Robert Jarzmik To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Date: Fri, 19 Feb 2016 23:08:42 +0100 Message-Id: <1455919722-8299-1-git-send-email-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.1.4 Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, Robert Jarzmik , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ASoC: wm9713: fix regmap free path X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- sound/soc/codecs/wm9713.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 2.1.4 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; } --