mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Johan Hovold <johan@kernel.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Oliver Neukum <oliver@neukum.org>,
	stable@vger.kernel.org
Subject: [PATCH] USB: serial: sierra: fix runtime pm leak on resume failure
Date: Tue, 20 Oct 2026 14:53:47 +0200	[thread overview]
Message-ID: <20261020125347.2145928-1-johan@kernel.org> (raw)

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 <oliver@neukum.org>
Cc: stable@vger.kernel.org	# 2.6.32
Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/sierra.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index f2cc7f364d20..d2d84542d86c 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -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);
-- 
2.55.0


                 reply	other threads:[~2026-10-20 12:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261020125347.2145928-1-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®