archive mirror
 help / color / mirror / Atom feed
From: Dinghao Liu <>
Cc: Mathias Nyman <>,
	Greg Kroah-Hartman <>,,
Subject: [PATCH] xhci: Fix runtime PM imbalance on error
Date: Thu, 21 May 2020 15:28:09 +0800	[thread overview]
Message-ID: <> (raw)

When dma_set_mask_and_coherent() returns an error code,
a pairing runtime PM usage counter decrement is needed
to keep the counter balanced.

Also, call pm_runtime_disable() when dma_set_mask_and_coherent()
returns an error code.

Signed-off-by: Dinghao Liu <>
 drivers/usb/host/xhci-histb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-histb.c b/drivers/usb/host/xhci-histb.c
index 5546e7e013a8..1d22a664477f 100644
--- a/drivers/usb/host/xhci-histb.c
+++ b/drivers/usb/host/xhci-histb.c
@@ -240,7 +240,7 @@ static int xhci_histb_probe(struct platform_device *pdev)
 	/* Initialize dma_mask and coherent_dma_mask to 32-bits */
 	ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
 	if (ret)
-		return ret;
+		goto disable_pm
 	hcd = usb_create_hcd(driver, dev, dev_name(dev));
 	if (!hcd) {

             reply	other threads:[~2020-05-21  7:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21  7:28 Dinghao Liu [this message]
2020-05-21 10:34 ` kbuild test robot

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:

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

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] xhci: Fix runtime PM imbalance on error' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox