[PATCH] mfd: cgbc: Fix teardown ordering in cgbc_remove()

Thomas Richard posted 1 patch 1 week, 5 days ago
drivers/mfd/cgbc-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] mfd: cgbc: Fix teardown ordering in cgbc_remove()
Posted by Thomas Richard 1 week, 5 days ago
Release Board Controller session once children are removed by the core.

Cc: stable@vger.kernel.org
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/cover.1783507945.git.u.kleine-koenig%40baylibre.com?part=19
Fixes: 6f1067cfbee7 ("mfd: Add Congatec Board Controller driver")
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
 drivers/mfd/cgbc-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/cgbc-core.c b/drivers/mfd/cgbc-core.c
index 10bb4b414c34..2becaf797646 100644
--- a/drivers/mfd/cgbc-core.c
+++ b/drivers/mfd/cgbc-core.c
@@ -364,9 +364,9 @@ static void cgbc_remove(struct platform_device *pdev)
 {
 	struct cgbc_device_data *cgbc = platform_get_drvdata(pdev);
 
-	cgbc_session_release(cgbc);
-
 	mfd_remove_devices(&pdev->dev);
+
+	cgbc_session_release(cgbc);
 }
 
 static struct platform_driver cgbc_driver = {

---
base-commit: 8cdeaa50eae8dad34885515f62559ee83e7e8dda
change-id: 20260710-cgbc-core-fix-cgbc-remove-50cb2e982bab

Best regards,
-- 
Thomas Richard <thomas.richard@bootlin.com>
Re: (subset) [PATCH] mfd: cgbc: Fix teardown ordering in cgbc_remove()
Posted by Lee Jones 2 days, 9 hours ago
On Mon, 13 Jul 2026 16:43:43 +0200, Thomas Richard wrote:
> Release Board Controller session once children are removed by the core.

Applied, thanks!

[1/1] mfd: cgbc: Fix teardown ordering in cgbc_remove()
      commit: adfe19688536f8f6d2bfd84c33b5af8f26e1e4f8

--
Lee Jones [李琼斯]