Linux USB
 help / color / mirror / Atom feed
From: Guangshuo Li <lgs201920130244@gmail.com>
To: gregkh@linuxfoundation.org, mathias.nyman@intel.com,
	thierry.reding@kernel.org, jonathanh@nvidia.com
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	rosenp@gmail.com, kees@kernel.org, lgs201920130244@gmail.com,
	avorontsov@ru.mvista.com, linux-tegra@vger.kernel.org,
	jckuo@nvidia.com, eeodqql09@gmail.com, stern@rowland.harvard.edu,
	davidm@egauge.net
Subject: [PATCH 2/3] usb: xhci: tegra: release padctl node reference after probe
Date: Thu, 24 Sep 2026 19:21:55 +0800	[thread overview]
Message-ID: <20260924112156.1564208-3-lgs201920130244@gmail.com> (raw)
In-Reply-To: <20260924112156.1564208-1-lgs201920130244@gmail.com>

tegra_xusb_probe() obtains np with of_parse_phandle(), but the successful
path returns without the matching of_node_put(). The probe error path
already releases the reference through the put_padctl label.

Release np before returning from a successful probe so the node reference
is balanced once it is no longer needed.

Fixes: 971ee247060d ("usb: xhci: tegra: Enable ELPG for runtime/system PM")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
---
 drivers/usb/host/xhci-tegra.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index 6f235d1e117e..93e794b3343a 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -1951,6 +1951,7 @@ static int tegra_xusb_probe(struct platform_device *pdev)
 		pm_runtime_enable(tegra->dev);
 	}
 
+	of_node_put(np);
 	return 0;
 
 remove_usb3:
-- 
2.43.0


  parent reply	other threads:[~2026-09-24 11:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 11:21 [PATCH 0/3] usb: host: balance resource lifetimes in host drivers Guangshuo Li
2026-09-24 11:21 ` [PATCH 1/3] usb: fhci: release IRQ and MMIO mappings on remove Guangshuo Li
2026-09-24 11:21 ` Guangshuo Li [this message]
2026-09-24 11:21 ` [PATCH 3/3] usb: max3421: Free transfer buffers " Guangshuo Li

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=20260924112156.1564208-3-lgs201920130244@gmail.com \
    --to=lgs201920130244@gmail.com \
    --cc=avorontsov@ru.mvista.com \
    --cc=davidm@egauge.net \
    --cc=eeodqql09@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jckuo@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=rosenp@gmail.com \
    --cc=stern@rowland.harvard.edu \
    --cc=thierry.reding@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