FAILED: patch "[PATCH] usb: dwc3: imx8mp: fix device leak at unbind" failed to apply to 5.15-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 086a0e516f7b3844e6328a5c69e2708b66b0ce18
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025082121-magician-conceal-4df0@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 086a0e516f7b3844e6328a5c69e2708b66b0ce18 Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Thu, 24 Jul 2025 11:19:06 +0200
Subject: [PATCH] usb: dwc3: imx8mp: fix device leak at unbind
Make sure to drop the reference to the dwc3 device taken by of_find_device_by_node() on probe errors and on driver unbind.
drivers/usb/dwc3/dwc3-imx8mp.c +6 -1
@@ -244,7 +244,7 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev) IRQF_ONESHOT, dev_name(dev), dwc3_imx);if (err) {dev_err (dev,"failed to request IRQ #%d --> %d\n" , irq, err); - goto depopulate; + goto put_dwc3; }device_set_wakeup_capable (dev, true);
@@ -252,6 +252,8 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)return 0 ; +put_dwc3: +put_device (&dwc3_imx->dwc3->dev); depopulate:of_platform_depopulate (dev); remove_swnode:
@@ -265,8 +267,11 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)static void dwc3_imx8mp_remove (struct platform_device *pdev) { +struct dwc3_imx8mp *dwc3_imx =platform_get_drvdata (pdev);struct device *dev = &pdev->dev; +put_device (&dwc3_imx->dwc3->dev); +pm_runtime_get_sync (dev);of_platform_depopulate (dev);device_remove_software_node (dev);
Sasha Levin
maintainerPATCH 1/1 usb: dwc3: imx8mp: fix device leak at unbind
From: Johan Hovold <[email protected]>
[ Upstream commit 086a0e516f7b3844e6328a5c69e2708b66b0ce18 ]
Make sure to drop the reference to the dwc3 device taken by of_find_device_by_node() on probe errors and on driver unbind.
--- drivers/usb/dwc3/dwc3-imx8mp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-imx8mp.c +5 -1
@@ -183,7 +183,7 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev) IRQF_ONESHOT, dev_name(dev), dwc3_imx);if (err) {dev_err (dev,"failed to request IRQ #%d --> %d\n" , irq, err); - goto depopulate; + goto put_dwc3; }device_set_wakeup_capable (dev, true);
@@ -191,6 +191,8 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)return 0 ; +put_dwc3: +put_device (&dwc3_imx->dwc3->dev); depopulate:of_platform_depopulate (dev); err_node_put:
@@ -211,6 +213,8 @@ static int dwc3_imx8mp_remove(struct platform_device *pdev)struct dwc3_imx8mp *dwc3_imx =platform_get_drvdata (pdev);struct device *dev = &pdev->dev; +put_device (&dwc3_imx->dwc3->dev); +pm_runtime_get_sync (dev);of_platform_depopulate (dev);
Signature · 1 line
2.50.1