mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
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>
This commit is contained in:
parent
1015c27a5e
commit
45dba8011e
|
|
@ -736,7 +736,7 @@ static int uss720_probe(struct usb_interface *intf,
|
|||
ret = get_1284_register(pp, 0, ®, GFP_KERNEL);
|
||||
dev_dbg(&intf->dev, "reg: %7ph\n", priv->reg);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
goto probe_abort;
|
||||
|
||||
ret = usb_find_last_int_in_endpoint(interface, &epd);
|
||||
if (!ret) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user