[PATCH] USB: misc: uss720: unregister parport on probe failure
From: Myeonghun Pak
Date: Wed Jul 01 2026 - 08:43:58 EST
uss720_probe() registers a parport before reading the 1284 register used
to detect unsupported Belkin F5U002 adapters. If get_1284_register()
fails, the error path drops the driver private data and the USB device
reference, but leaves the parport device registered.
Undo the pre-announce registration with parport_del_port(). Clear
priv->pp before unregistering the port, matching the disconnect path and
avoiding leaving a stale pointer in the private data.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: 3295f1b866bf ("usb: misc: uss720: check for incompatible versions of the Belkin F5U002")
Cc: stable@xxxxxxxxxxxxxxx
Co-developed-by: Ijae Kim <ae878000@xxxxxxxxx>
Signed-off-by: Ijae Kim <ae878000@xxxxxxxxx>
Signed-off-by: Myeonghun Pak <mhun512@xxxxxxxxx>
---
drivers/usb/misc/uss720.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c
index a8af7615b1..8a5ffb19a5 100644
--- a/drivers/usb/misc/uss720.c
+++ b/drivers/usb/misc/uss720.c
@@ -749,6 +749,10 @@ static int uss720_probe(struct usb_interface *intf,
return 0;
probe_abort:
+ if (pp) {
+ priv->pp = NULL;
+ parport_del_port(pp);
+ }
kill_all_async_requests_priv(priv);
kref_put(&priv->ref_count, destroy_priv);
return -ENODEV;
--
2.47.1