Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2518765lqp; Mon, 25 Mar 2024 00:50:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUwcDxntkxDccvVzbyPjXAhdDE2q/6G49HnYnZpcZ34iE9l2hJkSSYZ2lVeVltczfvMY5ozbMmT/pJCb6vt0re7Kay/Aib5ivMKW+I7CA== X-Google-Smtp-Source: AGHT+IHGFGrBgSCaFJuYL1+cnxtQ2CoixsqIT53ZuCUe8LgG6gYamHD58HZSJIY1cyWjFGn9Fwhl X-Received: by 2002:a17:90b:189:b0:2a0:24a1:e358 with SMTP id t9-20020a17090b018900b002a024a1e358mr8294347pjs.13.1711353010680; Mon, 25 Mar 2024 00:50:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711353010; cv=pass; d=google.com; s=arc-20160816; b=DWCk6wKrFpc6ntbb7INegQZiB4IUWUg5ETxCvl5yl+BjWT3eovLsRKRqZDd0YVsAHX t8O9cTiLMybCVSDKLpeMLO96hgEDlt3PvjzbFcUz3eFJ7AaytR1jcd+eJtDEzUzJ84SJ dHCY3BqteFEEtzAbAsV9AyxDemicYusVLaxCmEc5Wp1W0eMI/gf1RvwiS/p74kOVpgTq cm5yIcxqsFxQ7r97tq/qmgWRtrm+Xhp+waZyYaziPKICy5SSlhcs0iEqKsyTJIwJ8UiA xnfUn84X7WOyYGzbdA02Xg1RN/HPvmMJMM+gIpHDUqEvTibAcIgMQRqywq37qrmIjp8y eFxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=HQc7VGPAf2jxhNbNLe5LypJvPkPBao5gQ2ZTx1NB7sE=; fh=uzWggxH4sw4jEuPx1jU0DHvCUyLVQRFHTGNG2uYYXVg=; b=B/T1gmlCEcTfurJ7gE5O+ICPmKg1MQ8yD5fuJlEH2/LCAUQwy+qbyc6Zqr6UpUHu4A IRQxF+9w0iJOoT7WHRo77IjX4a+u4GklMUXUq/ZTVJUhM1Bo6sgZuMxIHg+NWoSCaP4+ mlxke9nCkcpxLgWPHz8t88jHk/mj/xXPIeIUp5huDxmwTAJEDtYmhBDJZJhjIkDwJNOZ +TYz7+ntxr+LCAgQH4nkps9zx3s/2e+xEuf8eFOQq65tFSrDMOVMPpI252gTFx19AArK i81sGOI+87BSbBFEYtK0DmG7Ur10Mu7RVRLPKXX2zEdR5cmfMb8YpBC7zAdhDsMU3+fT ORWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r4zOPuwH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115557-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115557-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l11-20020a17090a598b00b0029b95e75617si10798146pji.167.2024.03.25.00.50.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 00:50:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115557-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r4zOPuwH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115557-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115557-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 517EB2926C8 for ; Mon, 25 Mar 2024 07:47:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 990F324E3A8; Mon, 25 Mar 2024 02:43:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="r4zOPuwH" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0000312C7FF; Sun, 24 Mar 2024 22:57:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321076; cv=none; b=vF0+K5jOxLhF/HApzpw7UrewYTzuDdqtgNSi9UmkcHImA8RuszTD9f6FgWAKIwouxprlBINA5ijQ5ajps01KnNOwFZWu3JAsLi591s9QYO4SvqhPiT4rbMqyJvfLdOMZcQRz33V8AAtSG//cjupf7xopr1hAoGRftS5MCuz7ZNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321076; c=relaxed/simple; bh=6DQJougX0ptKj6bY2XsiqJrGTso8eSy+jqQnXQDK+8M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cnIZfNphr3Kw+vH3NKpNlT24g2ubDBNCSEYQntfElLyVE0Vq/wOkYQBY//sFqR5Zh1Ht+veK13WcasAWeivZtNEXoEgWm0d7oSpZkM5kfJaChgzwaoF6ORODnRf31KtQGTn4eUwrOYmzZcvDmP6YilxRlNtr/hCsTvvBFotaYA0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r4zOPuwH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C7E0C433F1; Sun, 24 Mar 2024 22:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711321075; bh=6DQJougX0ptKj6bY2XsiqJrGTso8eSy+jqQnXQDK+8M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r4zOPuwHEF77CBRPHztIYANtGWf+ZPNUu4M8NV/4o09j+WAQHD3VYtuzlBKhEDp7K OmVjXqgZuT4hT+cjZhVMQZGasE/BvucWuRDHu5WM6mKW+m/jFAhzMN7TZvEkvcuaRr l5LGDbK24gtPCGeJvdDxJXza42+pNMjMh10OhAlt87kp3LJZEKWiOnspre1Lc3WA60 zK9TQrXq4yleK8uM9vqlxt10u1UyEnwdWB3N659jS7OEXb5ZBNiJdpyf6BA3mbF8FF lwkXKHjnu6XyIGWwAwYfNNALT82x43kd47fwrb0sVn2NlFQU03qWy/VozDRtM1pl4e Dxs2I5EfuQ1tQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Geert Uytterhoeven , Mark Brown , Sasha Levin Subject: [PATCH 6.7 639/713] ASoC: tlv320adc3xxx: Don't strip remove function when driver is builtin Date: Sun, 24 Mar 2024 18:46:05 -0400 Message-ID: <20240324224720.1345309-640-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324224720.1345309-1-sashal@kernel.org> References: <20240324224720.1345309-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Uwe Kleine-König [ Upstream commit f31e0d0c2cad23e0cc48731634f85bb2d8707790 ] Using __exit for the remove function results in the remove callback being discarded with SND_SOC_TLV320ADC3XXX=y. When such a device gets unbound (e.g. using sysfs or hotplug), the driver is just removed without the cleanup being performed. This results in resource leaks. Fix it by compiling in the remove callback unconditionally. This also fixes a W=1 modpost warning: WARNING: modpost: sound/soc/codecs/snd-soc-tlv320adc3xxx: section mismatch in reference: adc3xxx_i2c_driver+0x10 (section: .data) -> adc3xxx_i2c_remove (section: .exit.text) (which only happens with SND_SOC_TLV320ADC3XXX=m). Fixes: e9a3b57efd28 ("ASoC: codec: tlv320adc3xxx: New codec driver") Signed-off-by: Uwe Kleine-König Reviewed-by: Geert Uytterhoeven Link: https://msgid.link/r/20240310143852.397212-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/tlv320adc3xxx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/tlv320adc3xxx.c b/sound/soc/codecs/tlv320adc3xxx.c index 420bbf588efea..e100cc9f5c192 100644 --- a/sound/soc/codecs/tlv320adc3xxx.c +++ b/sound/soc/codecs/tlv320adc3xxx.c @@ -1429,7 +1429,7 @@ static int adc3xxx_i2c_probe(struct i2c_client *i2c) return ret; } -static void __exit adc3xxx_i2c_remove(struct i2c_client *client) +static void adc3xxx_i2c_remove(struct i2c_client *client) { struct adc3xxx *adc3xxx = i2c_get_clientdata(client); @@ -1452,7 +1452,7 @@ static struct i2c_driver adc3xxx_i2c_driver = { .of_match_table = tlv320adc3xxx_of_match, }, .probe = adc3xxx_i2c_probe, - .remove = __exit_p(adc3xxx_i2c_remove), + .remove = adc3xxx_i2c_remove, .id_table = adc3xxx_i2c_id, }; -- 2.43.0