From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 444B94D7D24 for ; Wed, 16 Sep 2026 19:38:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789587527; cv=none; b=uuwpJtJzo3L+e5jrNSBvpbtVlY3C8ZN4DusOBH40v7nnOKvsTLC5Wq4jR9e6aAm/VYwxI/UT8Q6NnSV8TM3vwDl61bqLSTMQTlNTANPm62BxFQQse1w82E0bsKGAeNsaL5z6Zv6Ns5ti+wrj7EbVRLVGEePrOlvTeGJjvenomp0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789587527; c=relaxed/simple; bh=aoudXyBzh8fTBxtLjSq/mvk74M6fjLaG8dTwZGwhkuU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=guXxw4Hcft82hbqvXPFpqKzyvdNpWN8glI97MnKgtQUcpWnZjTGjejUjah1rTV+K0RlP+RwyQDighClEwMCRPbr9cSmEUwXY1j/Pdfyuolr6kY0KKUFBfvUCtcyuLXDsgvTAvaTTWmjPBrf+ZFtiCrZn9LS0myyoytkHGjnbFJo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NMt1m66n; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NMt1m66n" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 288771F00893; Wed, 16 Sep 2026 19:38:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789587511; bh=ufN6RnXV9j9eXotuwXtTarCFNFL6uYsrCutZJb07s/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NMt1m66nxaWxpdZRRra/CqBYbVnXN7nfrE/+Z3o9eRSF3ZkYLgaa3nWdS/x0jwfyg NtwuALFvunVoJib/hsRIF1Z2GAVKjaiiEGoycBC4ghpC+/YSsJOKwpUqEnZ9dkxI5U AhrAl6NRNULo78qHnv5Z5lbAf6scRUuTtZnBJFkkpD54RFuNxhfTEVP8SxIWOkoZ6Q 2f1pgaWkjgRzyTniLmDJBLoirQGxa8ecyc+axKGCGrMpJf0Zbn7QDEeQziKBVR2JAU EP6O8gumHW+5mLgN0BJJMickDW3huFjXgdcFPfUUohDX0Mbm1Jr0T4XdPyny326rdH 5e8A2EbUTcZ5Q== From: Sasha Levin To: stable@vger.kernel.org Cc: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Luiz Augusto von Dentz , Sasha Levin Subject: [PATCH 5.15.y 1/2] Bluetooth: btqcomsmd: Convert to platform remove callback returning void Date: Wed, 16 Sep 2026 15:38:28 -0400 Message-ID: <20260916193829.2327507-1-sashal@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <2026091652-sanding-chuck-ede3@gregkh> References: <2026091652-sanding-chuck-ede3@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Uwe Kleine-König [ Upstream commit 4a62832f565c950d645a4f7b199a0a7985815940 ] The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Luiz Augusto von Dentz Stable-dep-of: f5a427b16e45 ("Bluetooth: btqcomsmd: destroy RPMsg endpoints before freeing hci_dev") Signed-off-by: Sasha Levin --- drivers/bluetooth/btqcomsmd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/bluetooth/btqcomsmd.c b/drivers/bluetooth/btqcomsmd.c index 11c7e04bf3947..88dbb2f3fabf9 100644 --- a/drivers/bluetooth/btqcomsmd.c +++ b/drivers/bluetooth/btqcomsmd.c @@ -197,7 +197,7 @@ static int btqcomsmd_probe(struct platform_device *pdev) return ret; } -static int btqcomsmd_remove(struct platform_device *pdev) +static void btqcomsmd_remove(struct platform_device *pdev) { struct btqcomsmd *btq = platform_get_drvdata(pdev); @@ -206,8 +206,6 @@ static int btqcomsmd_remove(struct platform_device *pdev) rpmsg_destroy_ept(btq->cmd_channel); rpmsg_destroy_ept(btq->acl_channel); - - return 0; } static const struct of_device_id btqcomsmd_of_match[] = { @@ -218,7 +216,7 @@ MODULE_DEVICE_TABLE(of, btqcomsmd_of_match); static struct platform_driver btqcomsmd_driver = { .probe = btqcomsmd_probe, - .remove = btqcomsmd_remove, + .remove_new = btqcomsmd_remove, .driver = { .name = "btqcomsmd", .of_match_table = btqcomsmd_of_match, -- 2.53.0