summaryrefslogtreecommitdiff
path: root/drivers/usb/common
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2024-01-27 01:38:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-23 11:51:31 +0300
commit33713945cc92ea9c4a1a9479d5c1b7acb7fc4df3 (patch)
tree2a6e472eeb0ab473b31e9b58b6441d2f5a0f617d /drivers/usb/common
parent330e7d773b81ccf11f575bcf1a6cc798e11e2c2d (diff)
downloadlinux-33713945cc92ea9c4a1a9479d5c1b7acb7fc4df3.tar.xz
usb: ulpi: Fix debugfs directory leak
commit 3caf2b2ad7334ef35f55b95f3e1b138c6f77b368 upstream. The ULPI per-device debugfs root is named after the ulpi device's parent, but ulpi_unregister_interface tries to remove a debugfs directory named after the ulpi device itself. This results in the directory sticking around and preventing subsequent (deferred) probes from succeeding. Change the directory name to match the ulpi device. Fixes: bd0a0a024f2a ("usb: ulpi: Add debugfs support") Cc: stable@vger.kernel.org Signed-off-by: Sean Anderson <sean.anderson@seco.com> Link: https://lore.kernel.org/r/20240126223800.2864613-1-sean.anderson@seco.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/common')
-rw-r--r--drivers/usb/common/ulpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
index 84d91b1c1eed..0886b19d2e1c 100644
--- a/drivers/usb/common/ulpi.c
+++ b/drivers/usb/common/ulpi.c
@@ -301,7 +301,7 @@ static int ulpi_register(struct device *dev, struct ulpi *ulpi)
return ret;
}
- root = debugfs_create_dir(dev_name(dev), ulpi_root);
+ root = debugfs_create_dir(dev_name(&ulpi->dev), ulpi_root);
debugfs_create_file("regs", 0444, root, ulpi, &ulpi_regs_fops);
dev_dbg(&ulpi->dev, "registered ULPI PHY: vendor %04x, product %04x\n",