* [PATCH] usb: typec: tcpm: qcom: Release the connector fwnode reference
@ 2026-10-25 21:54 ` David Heidelberg via B4 Relay
0 siblings, 0 replies; 3+ messages in thread
From: David Heidelberg @ 2026-10-25 21:54 UTC (permalink / raw)
To: Bryan O'Donoghue, Heikki Krogerus, Greg Kroah-Hartman,
Dmitry Baryshkov, Konrad Dybcio
Cc: linux-arm-msm, linux-usb, linux-kernel, phone-devel,
Selby Mashiki, David Heidelberg
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@linux.intel.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
Separated from (for stable):
https://lore.kernel.org/all/20260926-typec-v1-0-31adc19f32c6@ixit.cz/
---
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@ixit.cz>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] usb: typec: tcpm: qcom: Release the connector fwnode reference
@ 2026-10-25 21:54 ` David Heidelberg via B4 Relay
0 siblings, 0 replies; 3+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-10-25 21:54 UTC (permalink / raw)
To: Bryan O'Donoghue, Heikki Krogerus, Greg Kroah-Hartman,
Dmitry Baryshkov, Konrad Dybcio
Cc: linux-arm-msm, linux-usb, linux-kernel, phone-devel,
Selby Mashiki, David Heidelberg
From: David Heidelberg <david@ixit.cz>
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@linux.intel.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
Separated from (for stable):
https://lore.kernel.org/all/20260926-typec-v1-0-31adc19f32c6@ixit.cz/
---
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@ixit.cz>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: typec: tcpm: qcom: Release the connector fwnode reference
2026-10-25 21:54 ` David Heidelberg via B4 Relay
(?)
@ 2026-10-25 22:02 ` sashiko-bot
-1 siblings, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-10-25 22:02 UTC (permalink / raw)
To: David Heidelberg; +Cc: linux-usb
> From: David Heidelberg <david@ixit.cz>
>
> 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@linux.intel.com>
> Signed-off-by: David Heidelberg <david@ixit.cz>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261025-typec-of-fix-v1-1-06bfc16a7846@ixit.cz?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-25 22:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-25 21:54 [PATCH] usb: typec: tcpm: qcom: Release the connector fwnode reference David Heidelberg
2026-10-25 21:54 ` David Heidelberg via B4 Relay
2026-10-25 22:02 ` sashiko-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.