Skip to content

Commit 45dba80

Browse files
committed
usb: misc: uss720: properly clean up reference in uss720_probe()
If get_1284_register() fails, the usb device reference count is incorrect and needs to be properly dropped before returning. That will happen when the kref is dropped in the call to destroy_priv(), so jump to that error path instead of returning directly. Cc: stable <stable@kernel.org> Assisted-by: gkh_clanker_2000 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/2026022342-smokiness-stove-d792@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1015c27 commit 45dba80

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/usb/misc/uss720.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ static int uss720_probe(struct usb_interface *intf,
736736
ret = get_1284_register(pp, 0, &reg, GFP_KERNEL);
737737
dev_dbg(&intf->dev, "reg: %7ph\n", priv->reg);
738738
if (ret < 0)
739-
return ret;
739+
goto probe_abort;
740740

741741
ret = usb_find_last_int_in_endpoint(interface, &epd);
742742
if (!ret) {

0 commit comments

Comments
 (0)