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 D8C2343CEC7; Tue, 16 Jun 2026 18:32:26 +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=1781634747; cv=none; b=kZkarq5EEv3/kvcYoeIPUCcFNQx5ndNvn2NNClwpjexYkpG1PEH/CVF2edk2tjo5ESRejT587qVFhyLKTQ/hnxtlBsu/YeCK/KTDPi6QjilsyY+GA+MybTQLBkR3YNly39Pjrs6L96fEarILS0XVRXBmDYDDf7lnD6vZrpuTOXY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781634747; c=relaxed/simple; bh=ueVdoTjbktqTX3ilV22EfEy0qvs5s/pekJFViFIziC4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VMNA514yfsl+yhTfD8TARJrOJrmGvjHfXecNQIKGb6f9YaNqoqqZAMr2K14X1SICJ7WVDAsJ/8cW0HdnXCkWXQBB6u4f0DuVqehLzthtccPbkSkVFTvb4ZcbwNvHJUIErILNRh5faW7Mmc8TrrqaPb4VP0yLFP1TsIesiKo2YMQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1+eHyN/8; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1+eHyN/8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE2D01F000E9; Tue, 16 Jun 2026 18:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781634746; bh=Fj9GwBkgK8SVv0D8Q0GjSQSwM9PXSu+d461gnJMGzL4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1+eHyN/8t0V6+v5GQx6vILeLb4c23Y1hIXR6uLLZleZX42Ybg5B2Ozc0ilrxnzm7E g3qndamrAsOX8GjM9hVls5k0ucA65GEF8rT1MTjySrUrg4oB2r3UrHtRW5B9QQtngY Negok4fUTS6ZoYiVEFvozeDB7KTzqniKcmg2YlRM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Mark Brown , Sasha Levin Subject: [PATCH 5.15 322/411] spi: topcliff-pch: Convert to platform remove callback returning void Date: Tue, 16 Jun 2026 20:29:20 +0530 Message-ID: <20260616145118.271612299@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145100.376842714@linuxfoundation.org> References: <20260616145100.376842714@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Uwe Kleine-König [ Upstream commit b082694f18bdff807b42a3bccc62c3a524168f23 ] 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-83-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown Stable-dep-of: 5d6f477d6fc0 ("spi: topcliff-pch: fix controller deregistration") Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-topcliff-pch.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/spi/spi-topcliff-pch.c +++ b/drivers/spi/spi-topcliff-pch.c @@ -1417,7 +1417,7 @@ err_pci_iomap: return ret; } -static int pch_spi_pd_remove(struct platform_device *plat_dev) +static void pch_spi_pd_remove(struct platform_device *plat_dev) { struct pch_spi_board_data *board_dat = dev_get_platdata(&plat_dev->dev); struct pch_spi_data *data = platform_get_drvdata(plat_dev); @@ -1455,8 +1455,6 @@ static int pch_spi_pd_remove(struct plat pci_iounmap(board_dat->pdev, data->io_remap_addr); spi_unregister_master(data->master); - - return 0; } #ifdef CONFIG_PM static int pch_spi_pd_suspend(struct platform_device *pd_dev, @@ -1537,7 +1535,7 @@ static struct platform_driver pch_spi_pd .name = "pch-spi", }, .probe = pch_spi_pd_probe, - .remove = pch_spi_pd_remove, + .remove_new = pch_spi_pd_remove, .suspend = pch_spi_pd_suspend, .resume = pch_spi_pd_resume };