Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1873889pxb; Mon, 13 Sep 2021 07:19:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwljjL26ghaptCETYDGfjhdpWZ2J34a5q1uwZXAu8hBdUrwqTkuxYC9+c/9HrCdsQBlDGAz X-Received: by 2002:a05:6512:1592:: with SMTP id bp18mr3375420lfb.539.1631542799624; Mon, 13 Sep 2021 07:19:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631542799; cv=none; d=google.com; s=arc-20160816; b=ERuYzJ/dCqdheM8tYlnPGOTHWCGFGgJI72o6P4qzv6ILBgnaybsTCMDpbACMtWLQ7Q vfUVhSlGafAwqqFIvCRenq6jJIAt2d4BgGWEhqH5wcz0at4lD5zZPT3nPwL/gs5MECud oNWoAhrwiXP8psfAla2baesEqK+KVpaIJwOh/WifDV7eoGo/onr+jRv4o/6z75M9oLhn e5usERFUZ86wVYOJK6kmnRNhlTqhJhFfxb3wGetENfnpZEQnKR9CEYKxVDT3QxwNBfBv IRU36xYE9i4wmFIIFD4UQ1Yvcl5HdInqWV8jKFqSN2TTsd48ovXexPZ9frSO6hv9ISbE Dlhw== 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=GFEuyuRQccOWpnxjo/LAC2lsJTITMdAIKq+dpAR7IlE=; b=tLmnG3eKhswZJ6JqOzMz/KokusYKGdJW3IoREfjsLHCJD37MnkNbQKGvZq2pwXQ8Fj mdm8CskFf/Pcmo1yHl9p6NABGNm/Ad8erku5CgxP7kkRV15P9GbSpHIluhdQMZ9mamvq GVA2Sn4fmTTsY9sUWz+0Aw0TLcMErQBm0WxFo8LlvLo9Ev6Ts51aNUOpAe4wl7Yk/6dQ fWbNuNhxKSEueADQcMNj9M8NbdG5JPbRvm6c2BSdyaZuUR+tZmfhE7/juV196V7l1FKI 6HwD2eg+2QcFQoks3Ysm00MttjSIx8uG0aqmAL0jhqT6ew7yjirsQLLa7dMqX3tqLUvu Zt/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yA1I1rcv; 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 p4si8813461eju.288.2021.09.13.07.19.32; Mon, 13 Sep 2021 07:19:59 -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=yA1I1rcv; 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 S244391AbhIMORw (ORCPT + 99 others); Mon, 13 Sep 2021 10:17:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:59700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344284AbhIMOLq (ORCPT ); Mon, 13 Sep 2021 10:11:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 05D5661ABC; Mon, 13 Sep 2021 13:42:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631540545; bh=woE2grbPg3WPqA9HTL1cQBCX9cOnQFmfArs0J8oXWQU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yA1I1rcvnPfqcDDv2uKCuSFsKtkzpwTRqQ1OhofATM7dr64rYUqHniOL97JXjMp4Y 3uAfhrXr7kSQm/MUy7U2xu6gRvA2qKlw5IpgXMdIlVkEFvnSB9KhJMHCwWN/qhH5tH Vl2XU0zfCgcyitTNcglPZ75a3I/Q2kV9groVIiM8= 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.13 238/300] ASoC: wcd9335: Fix a double irq free in the remove function Date: Mon, 13 Sep 2021 15:14:59 +0200 Message-Id: <20210913131117.395159098@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131109.253835823@linuxfoundation.org> References: <20210913131109.253835823@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 86c92e03ea5d..933f59e4e56f 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