From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87781DF40 for ; Mon, 15 May 2023 16:39:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C47F3C4339B; Mon, 15 May 2023 16:39:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1684168747; bh=of5SpBz90v7O4iAoUywKhpVfD6CXHkr/ChzRtk4IMBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ovCnjZG4N4uyd5dxkO1TZa4GIskmdCau+W19Uhop6n25jbDhz43Yt82/bR6/coMfR 9EuCkoqSSKbfSu9Oa74ZPLdpDEsgkPGgePFg7nLyGxRTwi4YfZ+cqVEyNLZMx1L/Vs nQW9xX9OHgPD29usTw4nATrrLJeU27YoPz3fh0ZE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Li Jun , Thinh Nguyen , Johan Hovold Subject: [PATCH 4.19 008/191] USB: dwc3: fix runtime pm imbalance on unbind Date: Mon, 15 May 2023 18:24:05 +0200 Message-Id: <20230515161707.496127318@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230515161707.203549282@linuxfoundation.org> References: <20230515161707.203549282@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Johan Hovold commit 44d257e9012ee8040e41d224d0e5bfb5ef5427ea upstream. Make sure to balance the runtime PM usage count on driver unbind by adding back the pm_runtime_allow() call that had been erroneously removed. Fixes: 266d0493900a ("usb: dwc3: core: don't trigger runtime pm when remove driver") Cc: stable@vger.kernel.org # 5.9 Cc: Li Jun Acked-by: Thinh Nguyen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230404072524.19014-3-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/core.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1563,6 +1563,7 @@ static int dwc3_remove(struct platform_d dwc3_core_exit(dwc); dwc3_ulpi_exit(dwc); + pm_runtime_allow(&pdev->dev); pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); pm_runtime_set_suspended(&pdev->dev);