From: Felix Gu <ustc.gu@gmail.com>
To: Conor Dooley <conor.dooley@microchip.com>,
Daire McNamara <daire.mcnamara@microchip.com>,
Bin Liu <b-liu@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-riscv@lists.infradead.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, Felix Gu <ustc.gu@gmail.com>
Subject: [PATCH] usb: musb: mpfs: fix phy unregister in remove()
Date: Mon, 14 Sep 2026 19:09:13 +0800 [thread overview]
Message-ID: <20260914-mpfs-v1-1-0bb5b6c2e67c@gmail.com> (raw)
mpfs_remove() passed the glue platform device instead of the
registered generic PHY to usb_phy_generic_unregister(). This
unregistered the glue device from within its own remove
callback and leaked glue->phy.
Pass glue->phy instead.
Fixes: 7a96b6ea90a4 ("usb: musb: Add support for PolarFire SoC's musb controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
drivers/usb/musb/mpfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/musb/mpfs.c b/drivers/usb/musb/mpfs.c
index 587127abd30a..6cc2909b8ae3 100644
--- a/drivers/usb/musb/mpfs.c
+++ b/drivers/usb/musb/mpfs.c
@@ -357,7 +357,7 @@ static void mpfs_remove(struct platform_device *pdev)
clk_disable_unprepare(glue->clk);
platform_device_unregister(glue->musb);
- usb_phy_generic_unregister(pdev);
+ usb_phy_generic_unregister(glue->phy);
}
#ifdef CONFIG_OF
---
base-commit: 68142f986ff04b2b70b31db00f719bf690f64a9a
change-id: 20260914-mpfs-086b7d22f8e5
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
reply other threads:[~2026-09-14 11:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260914-mpfs-v1-1-0bb5b6c2e67c@gmail.com \
--to=ustc.gu@gmail.com \
--cc=b-liu@ti.com \
--cc=conor.dooley@microchip.com \
--cc=daire.mcnamara@microchip.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®