[PATCH] usb: typec: tcpm: qcom: Release the connector fwnode reference
From: David Heidelberg via B4 Relay
Date: Sun Oct 25 2026 - 17:54:45 EST
From: David Heidelberg <david@xxxxxxx>
device_get_named_child_node() returns the connector node with its
reference count incremented, but the port probe never drops it. The node
is only needed for the VBUS regulator lookup, so release it right after.
Fixes: 506927b6bf29 ("usb: typec: tcpm: qcom: prefer VBUS supply from the connector node")
Acked-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
Signed-off-by: David Heidelberg <david@xxxxxxx>
---
Separated from (for stable):
https://lore.kernel.org/all/20260926-typec-v1-0-31adc19f32c6@xxxxxxx/
---
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
index d3523435f3e01..6029d51db4393 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
@@ -5,16 +5,17 @@
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#include <linux/string_choices.h>
#include <linux/usb/tcpm.h>
#include <linux/usb/typec_mux.h>
#include <linux/workqueue.h>
@@ -728,16 +729,17 @@ int qcom_pmic_typec_port_probe(struct platform_device *pdev,
connector = device_get_named_child_node(dev, "connector");
if (!connector)
return -EINVAL;
pmic_typec_port->vdd_vbus = devm_of_regulator_get_optional(dev,
to_of_node(connector),
"vbus");
+ fwnode_handle_put(connector);
if (pmic_typec_port->vdd_vbus == ERR_PTR(-ENODEV))
pmic_typec_port->vdd_vbus = devm_regulator_get(dev, "vdd-vbus");
if (IS_ERR(pmic_typec_port->vdd_vbus))
return PTR_ERR(pmic_typec_port->vdd_vbus);
pmic_typec_port->dev = dev;
pmic_typec_port->base = base;
pmic_typec_port->regmap = regmap;
---
base-commit: 20a33c6b6cbe7e4805dfb6cd68816937443aa148
change-id: 20261025-typec-of-fix-873b3ac85803
Best regards,
--
David Heidelberg <david@xxxxxxx>