From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796384399; b=T+waWOxx7JI/DUleLEUkrRO0UAPyb/6pUiRKCD5MMOHV+MZaj4hFYa2S4YK70djylAfu Jqr4Aisaerz35hsBhsoWXeTy7YzNh8Q/+vfGM4OtzBsmAme0xCzqhEDEuwXTXsaHrX+yJ ke7BDAEyxq4Y/noK4yC2f7C+VgxCZ2WUUe2yarBQ1Tx4N84VJvs+WVIRoKsIUAHsvts08 3DHg8uMmuS/bdviLwRQr1GmrgvmIL6RHqM7pK7XPuE4o/CzHG2eNwMXrMZBh5JBEiTFCg 7HNenNADuiSXEQ4NFG0rwEYNARiYYckY0mBJAkbMs07wwew/8oKQT+giGKFzF2fX0tw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384399; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=ixmotgynig0W6F4s7Zw5SXxIhcCDRNPWay+Ik3zBfUM=; b=hxqlvhWxka6okGln1al9zXJ6a2j+cAmNhEiwijhaho3MnZYcfpiBDXc3z+I+iczmAFmw SaNe8dwIR1uNIBM4ZkMdnyge/TOBf7mKmIrzLej9WXLgqUtykmhEpz5njRkuC66Nl9gdv +c6fXx8HrIX+T1Keg5MqtRsxFZ1hZ1ggP8JC1ak4HGPRZkjC93FkFDm8/lNc02HNUP1cs BCo+gXH2urR7j/IAFVlzkHI4zbcrhJvAbjAvV54bDnlfixSquPAGq3xU+fedJ+J401yWX WlsdiFSkMzsT9ryubDOnXRsxQf46LlYrb6d4DWSSMPQMehTkyE/IS3KVySxMm5ionnQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=bQ9JI+BO; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F478606A322; Fri, 4 Dec 2026 11:39:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=bQ9JI+BO Received: by smtp.kernel.org (Postfix) with ESMTPSA id F06FF1F000C2; Fri, 4 Dec 2026 11:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384399; bh=ixmotgynig0W6F4s7Zw5SXxIhcCDRNPWay+Ik3zBfUM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bQ9JI+BO2C8Ug5Vr284Zk+mk24IHHi2wrgaJrvzRmDA+mPs4bn3P47ybp6tik3owv 16ddWuVBXmEWqsgcG/GcLr7ihfD3Bu8O4nH4Kn9E6i+JXreQWf2JWI+pHzgaDZnA9P Vixkm7Yogeo48UYLCvInxOtU6xa4P9kwXu6+CRKs= 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?= , Linus Walleij , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 6.6 0106/1167] gpio: mpc8xxx: Convert to platform remove callback returning void Date: Fri, 4 Dec 2026 18:52:13 +0900 Message-ID: <20261204100704.854073341@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Uwe Kleine-König [ Upstream commit 7a222f57d856c30433e5a526fc1bcc42fc8d92b1 ] 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 Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski Stable-dep-of: 9e4b35c95fed ("gpio: mpc8xxx: Fix potential use-after-free of IRQ domain") Signed-off-by: Sasha Levin --- drivers/gpio/gpio-mpc8xxx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index ebf2f511df597..c0125ac739066 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -419,7 +419,7 @@ static int mpc8xxx_probe(struct platform_device *pdev) return ret; } -static int mpc8xxx_remove(struct platform_device *pdev) +static void mpc8xxx_remove(struct platform_device *pdev) { struct mpc8xxx_gpio_chip *mpc8xxx_gc = platform_get_drvdata(pdev); @@ -427,8 +427,6 @@ static int mpc8xxx_remove(struct platform_device *pdev) irq_set_chained_handler_and_data(mpc8xxx_gc->irqn, NULL, NULL); irq_domain_remove(mpc8xxx_gc->irq); } - - return 0; } #ifdef CONFIG_ACPI @@ -441,7 +439,7 @@ MODULE_DEVICE_TABLE(acpi, gpio_acpi_ids); static struct platform_driver mpc8xxx_plat_driver = { .probe = mpc8xxx_probe, - .remove = mpc8xxx_remove, + .remove_new = mpc8xxx_remove, .driver = { .name = "gpio-mpc8xxx", .of_match_table = mpc8xxx_gpio_ids, -- 2.53.0