Skip to contentSkip to conversation

USB: serial: sierra: fix runtime pm leak on resume failure

PATCH New Johan Hovold 2 participants 2 messages Oct 20

Subsystems (3)
lore
Share & tools
lore

Johan Hovold

author maintainer
#0 lore raw

PATCH 1/1 USB: serial: sierra: fix runtime pm leak on resume failure

Make sure to balance the runtime PM usage count also if delayed URB submission fails during resume (e.g. to allow runtime PM to be used after the driver has been rebound).

Fixes e6929a9020ac ("USB: support for autosuspend in sierra while online")
Cc Oliver Neukum <[email protected]>
Cc [email protected] # 2.6.32
---
 drivers/usb/serial/sierra.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/serial/sierra.c +2 -0
index f2cc7f364d20..d2d84542d86c 100644
@@ -973,6 +973,8 @@ static int sierra_submit_delayed_urbs(struct usb_serial_port *port)
 			usb_unanchor_urb(urb);
 			kfree(urb->transfer_buffer);
 
+			usb_autopm_put_interface_async(port->serial->interface);
+
 			spin_lock(&portdata->lock);
 			portdata->outstanding_urbs--;
 			spin_unlock(&portdata->lock);
Signature · 1 line
2.55.0
#1 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 8 lines

Make sure to balance the runtime PM usage count also if delayed URB submission fails during resume (e.g. to allow runtime PM to be used after the driver has been rebound).

Fixes e6929a9020ac ("USB: support for autosuspend in sierra while online")
Cc Oliver Neukum <[email protected]>
Cc [email protected] # 2.6.32

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1