* [PATCH] usb: misc: uss720: properly clean up reference in uss720_probe()
@ 2026-02-23 7:24 Greg Kroah-Hartman
0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-02-23 7:24 UTC (permalink / raw)
To: linux-usb; +Cc: linux-kernel, Greg Kroah-Hartman, stable
If get_1284_register() fails, the usb device reference count is
incorrect and needs to be properly dropped before returning.
Cc: stable <stable@kernel.org>
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/misc/uss720.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c
index ec8bd968c4de..2d681eee1f99 100644
--- a/drivers/usb/misc/uss720.c
+++ b/drivers/usb/misc/uss720.c
@@ -735,8 +735,10 @@ static int uss720_probe(struct usb_interface *intf,
* here. */
ret = get_1284_register(pp, 0, ®, GFP_KERNEL);
dev_dbg(&intf->dev, "reg: %7ph\n", priv->reg);
- if (ret < 0)
+ if (ret < 0) {
+ usb_put_dev(usbdev);
return ret;
+ }
ret = usb_find_last_int_in_endpoint(interface, &epd);
if (!ret) {
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-02-23 7:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 7:24 [PATCH] usb: misc: uss720: properly clean up reference in uss720_probe() Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox