From patchwork Sat Feb 20 19:44:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 8367851 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 ED127C0553 for ; Sat, 20 Feb 2016 19:45:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E4972204FB for ; Sat, 20 Feb 2016 19:45:02 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id A3177204CF for ; Sat, 20 Feb 2016 19:45:01 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 14044261B03; Sat, 20 Feb 2016 20:44:55 +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 4609C26073D; Sat, 20 Feb 2016 20:44:47 +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 E96342614C1; Sat, 20 Feb 2016 20:44:45 +0100 (CET) Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr [80.12.242.123]) by alsa0.perex.cz (Postfix) with ESMTP id AB56726073D for ; Sat, 20 Feb 2016 20:44:38 +0100 (CET) Received: from belgarion.home ([109.222.195.191]) by mwinf5d36 with ME id Ljkb1s00148EqBx03jkbpc; Sat, 20 Feb 2016 20:44:38 +0100 X-ME-Helo: belgarion.home X-ME-Date: Sat, 20 Feb 2016 20:44:38 +0100 X-ME-IP: 109.222.195.191 From: Robert Jarzmik To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Date: Sat, 20 Feb 2016 20:44:30 +0100 Message-Id: <1455997470-12307-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 v2] 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 --- Since v1: fix the diff second hunk, god knows where it came from. --- sound/soc/codecs/wm9713.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 79e143625ac3..dd31a5207527 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; }