Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp70175pxb; Mon, 13 Sep 2021 13:12:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAx2RflfzImuhHK0a347Q29pDh3jP2yX9ax6dFzcF9pU7Kg1TeNnlB+VSDlqpFZNTDs8r/ X-Received: by 2002:a17:906:bc97:: with SMTP id lv23mr14113003ejb.529.1631563936984; Mon, 13 Sep 2021 13:12:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631563936; cv=none; d=google.com; s=arc-20160816; b=WwuKJKcqGp9v/28c4ofFsPJZK1OZZXR2XXi+VTS1LYhz40wnje3biWI2NTPTOhQigT Gi3Apu6HLFexUEg/y3Ls4iKBZBb3JojDm4ohaO8Y+RZhaiZHOzTok+LRssug4d7KMjHG J9laPtOSVVIHM0pNM9EbMK3he3UwvPf48VGM8i0UepvKqgHi1FEV+/EQXvA21lgLjg5V Z7IGw3L/cdonTLnyUTGWzs7mZGorGH38p86/yI5sfYW6iXKH1cVSgROvk6FjIvu1eAao PFg47r1HQfimAYNxjd14s3ECf5oVpcvJILVMZ8Fq4zom5soXtxiZDrhFbtc3FzHTAyN5 tJ7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=56w0AJ4BIvzhUq3DJou4iTNQ0k0eyr5A+G83rzsi+Dg=; b=YOOZt/98fst5dpkqKcwpSUT45ngiKdTMtTev4uTbuCaI7VL3jq+tCo3JGmaOfe/GlS iW2iF43WVxNToCGUQEZ9IngC5/4L/JtIElzDVdUeQkyET2v/nFT9Az/ZBRheUCDjo1Aj lwH5LH/Ja2jcCRMWph7GMoEflbrfjQ7Fdi3GxKZu5u22hhFikSlpMvaHhvwdvMWxTih2 AhzZE+gT7F8jdUczoSs6NbDYG6dQ21Pu75WcyL5RKrEpVG6jzmAIxnyj1gk96BswJeUP NO7oZh1SZmNS6yDPdyM+SKOioQv0JHMw+p56FGSmKvlqEvWrUZnyqu6PAXcvv2XaKsrr li8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ty133lJn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si645977edp.620.2021.09.13.13.11.53; Mon, 13 Sep 2021 13:12:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ty133lJn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244344AbhIMNtU (ORCPT + 99 others); Mon, 13 Sep 2021 09:49:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:51790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243693AbhIMNov (ORCPT ); Mon, 13 Sep 2021 09:44:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F3D2461465; Mon, 13 Sep 2021 13:31:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539879; bh=D/xOvvpPEDcQ/8xExe5ynXZnzkYVMnjGX4YssaTfmAE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ty133lJnpuefYAh3GAkJZ+Iz7xT5FtoEIHeGZ/+B0IQpPQmV9VukMJnt6/SBtIPF3 sNMpvJREglV+fmyb0iQlrewjw3GCUFSsifzNt5K9pKO7ZobS2/U2rfiEuMKOKDhqKV aqV1+YtRmGNaTyEj8lGhGd71KxYmPBE5LdlQ5eFQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Mark Brown , Sasha Levin Subject: [PATCH 5.10 197/236] ASoC: wcd9335: Fix a double irq free in the remove function Date: Mon, 13 Sep 2021 15:15:02 +0200 Message-Id: <20210913131107.088380658@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit 7a6a723e98aa45f393e6add18f7309dfffa1b0e2 ] 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: 20aedafdf492 ("ASoC: wcd9335: add support to wcd9335 codec") Signed-off-by: Christophe JAILLET Message-Id: <0614d63bc00edd7e81dd367504128f3d84f72efa.1629091028.git.christophe.jaillet@wanadoo.fr> Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wcd9335.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 4d2b1ec7c03b..0b7aae5cc783 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -4869,7 +4869,6 @@ static void wcd9335_codec_remove(struct snd_soc_component *comp) struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); wcd_clsh_ctrl_free(wcd->clsh_ctrl); - free_irq(regmap_irq_get_virq(wcd->irq_data, WCD9335_IRQ_SLIMBUS), wcd); } static int wcd9335_codec_set_sysclk(struct snd_soc_component *comp, -- 2.30.2