]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up queue-5.10/usb-musb-omap2430-fix-device-leak-at-unbind.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Aug 2025 07:36:14 +0000 (09:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Aug 2025 07:36:14 +0000 (09:36 +0200)
queue-5.10/series
queue-5.10/usb-musb-omap2430-convert-to-platform-remove-callback-returning-void.patch [deleted file]
queue-5.10/usb-musb-omap2430-fix-device-leak-at-unbind.patch

index bf47236ede27702460aed7f5968b1254968aace7..3f33fb3dea1c217f6ad4a170f458c1398600c8c4 100644 (file)
@@ -464,7 +464,6 @@ ata-fix-sata_mobile_lpm_policy-description-in-kconfig.patch
 scsi-ufs-exynos-fix-programming-of-hci_utrl_nexus_type.patch
 iio-adc-ad_sigma_delta-change-to-buffer-predisable.patch
 soc-qcom-mdt_loader-ensure-we-don-t-read-past-the-elf-header.patch
-usb-musb-omap2430-convert-to-platform-remove-callback-returning-void.patch
 usb-musb-omap2430-fix-device-leak-at-unbind.patch
 btrfs-populate-otime-when-logging-an-inode-item.patch
 acpi-processor-idle-check-acpi_fetch_acpi_dev-return-value.patch
diff --git a/queue-5.10/usb-musb-omap2430-convert-to-platform-remove-callback-returning-void.patch b/queue-5.10/usb-musb-omap2430-convert-to-platform-remove-callback-returning-void.patch
deleted file mode 100644 (file)
index f46134c..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-From sashal@kernel.org Thu Aug 21 18:14:17 2025
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 21 Aug 2025 12:14:12 -0400
-Subject: usb: musb: omap2430: Convert to platform remove callback returning void
-To: stable@vger.kernel.org
-Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>, "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>, "Sasha Levin" <sashal@kernel.org>
-Message-ID: <20250821161413.775044-1-sashal@kernel.org>
-
-From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-
-[ Upstream commit cb020bf52253327fe382e10bcae02a4f1da33c04 ]
-
-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 <u.kleine-koenig@pengutronix.de>
-Link: https://lore.kernel.org/r/20230405141009.3400693-8-u.kleine-koenig@pengutronix.de
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Stable-dep-of: 1473e9e7679b ("usb: musb: omap2430: fix device leak at unbind")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/usb/musb/omap2430.c |    6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
---- a/drivers/usb/musb/omap2430.c
-+++ b/drivers/usb/musb/omap2430.c
-@@ -432,14 +432,12 @@ err0:
-       return ret;
- }
--static int omap2430_remove(struct platform_device *pdev)
-+static void omap2430_remove(struct platform_device *pdev)
- {
-       struct omap2430_glue *glue = platform_get_drvdata(pdev);
-       platform_device_unregister(glue->musb);
-       pm_runtime_disable(glue->dev);
--
--      return 0;
- }
- #ifdef CONFIG_PM
-@@ -509,7 +507,7 @@ MODULE_DEVICE_TABLE(of, omap2430_id_tabl
- static struct platform_driver omap2430_driver = {
-       .probe          = omap2430_probe,
--      .remove         = omap2430_remove,
-+      .remove_new     = omap2430_remove,
-       .driver         = {
-               .name   = "musb-omap2430",
-               .pm     = DEV_PM_OPS,
index 170f6d15f4293c6c5da1f9cb4893a29665aa6f44..276d74dae058bde72b4123779e9b98232b486bc8 100644 (file)
@@ -55,12 +55,12 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  err2:
        platform_device_put(musb);
  
-@@ -438,6 +440,8 @@ static void omap2430_remove(struct platf
+@@ -438,6 +440,8 @@ static int omap2430_remove(struct platfo
  
        platform_device_unregister(glue->musb);
        pm_runtime_disable(glue->dev);
 +      if (!IS_ERR(glue->control_otghs))
 +              put_device(glue->control_otghs);
- }
  
- #ifdef CONFIG_PM
+       return 0;
+ }