From mboxrd@z Thu Jan 1 00:00:00 1970 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 C357A4DBD86 for ; Wed, 13 May 2026 17:44:58 +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=1778694298; cv=none; b=fg2GNsxJeJRvWGHn5jL3aoNWf8bOKA9EQME8eARwjU9rY+k4AtyTfafod4jQUcjQXF+YX6uXEEMjbhM/zDNH2lHCpDrcE7/uuj/wjIpiZ5AUOFxCL+KeLfGpZNDpVQF3hvRx9B51euz8dCdge5dLFRiAX4KPGkJCOaGezhs6/+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778694298; c=relaxed/simple; bh=yGIL8KEArg5EuwC1+5+PG2IZMjxwAjzwMky7qyxcjvM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pt8zEqTrUeBVlxQkMEk946oB+kY+Q8jXCXpJ2xRmjZABBQ3ZDunTGaR8KQelsiDAYHQ4bOwI0lUK4f+XMxBq1aWzwYHohfBK66BCAFopmMiifOi226zEmECbIyYABS+jTNEhzfkoJdlQXL9YDYIa9hypf4cZie8BSDNGiCaECRA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mYVkirPj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mYVkirPj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1F91C19425; Wed, 13 May 2026 17:44:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778694298; bh=yGIL8KEArg5EuwC1+5+PG2IZMjxwAjzwMky7qyxcjvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mYVkirPj3rI7WrQMasmjfGVzfSpHnuyxfGzXnWE/Uj1+jby5d29YmrmnVqZXJQISH 5/qYyH7p4xgte/QzdaZqqH498+QO1RMjtqEwuURTYuBv3XuxDuo6rey0gODDpySdms MWyeltKM2Jt812ylxaqbFIY2lIS5T4NBFLiXHy3B2s5jWGobaADz4CuX6iBHM7wF41 lRMVe4bMJAfHsvwwokuAeEuWGAnh/pvot+HKnczQ2fl/sOyVlTUovHblhyrzKL3sbr xYQG0XKBaE3MBEocOyhWQelj2FDhYDVIQghHRkNQMJ8XJGXhkf1yKVvWO9AcLs6y8c Me1R0p32t5n+Q== From: Sasha Levin To: stable@vger.kernel.org Cc: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Mark Brown , Sasha Levin Subject: [PATCH 6.1.y 1/3] spi: synquacer: Convert to platform remove callback returning void Date: Wed, 13 May 2026 13:44:53 -0400 Message-ID: <20260513174455.3896307-1-sashal@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <2026051241-embezzle-retrial-5eb7@gregkh> References: <2026051241-embezzle-retrial-5eb7@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 1972cdc47df737f5b90ac2132080004f5e413e91 ] 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-78-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown Stable-dep-of: 75d849c3452e ("spi: syncuacer: fix controller deregistration") Signed-off-by: Sasha Levin --- drivers/spi/spi-synquacer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-synquacer.c b/drivers/spi/spi-synquacer.c index dc188f9202c97..3a92f722a6c50 100644 --- a/drivers/spi/spi-synquacer.c +++ b/drivers/spi/spi-synquacer.c @@ -735,7 +735,7 @@ static int synquacer_spi_probe(struct platform_device *pdev) return ret; } -static int synquacer_spi_remove(struct platform_device *pdev) +static void synquacer_spi_remove(struct platform_device *pdev) { struct spi_master *master = platform_get_drvdata(pdev); struct synquacer_spi *sspi = spi_master_get_devdata(master); @@ -743,8 +743,6 @@ static int synquacer_spi_remove(struct platform_device *pdev) pm_runtime_disable(sspi->dev); clk_disable_unprepare(sspi->clk); - - return 0; } static int __maybe_unused synquacer_spi_suspend(struct device *dev) @@ -820,7 +818,7 @@ static struct platform_driver synquacer_spi_driver = { .acpi_match_table = ACPI_PTR(synquacer_hsspi_acpi_ids), }, .probe = synquacer_spi_probe, - .remove = synquacer_spi_remove, + .remove_new = synquacer_spi_remove, }; module_platform_driver(synquacer_spi_driver); -- 2.53.0