Skip to content

Commit 7f02b8a

Browse files
javiercarrascocruzgregkh
authored andcommitted
usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes
The right function to release a fwnode acquired via device_get_named_child_node() is fwnode_handle_put(), and not fwnode_remove_software_node(), as no software node is being handled. Replace the calls to fwnode_remove_software_node() with fwnode_handle_put() in qcom_pmic_typec_probe() and qcom_pmic_typec_remove(). Cc: [email protected] Fixes: a4422ff ("usb: typec: qcom: Add Qualcomm PMIC Type-C driver") Suggested-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Javier Carrasco <[email protected]> Acked-by: Bryan O'Donoghue <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/20241020-qcom_pmic_typec-fwnode_remove-v2-1-7054f3d2e215@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 623dae3 commit 7f02b8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static int qcom_pmic_typec_probe(struct platform_device *pdev)
123123
port_unregister:
124124
tcpm_unregister_port(tcpm->tcpm_port);
125125
fwnode_remove:
126-
fwnode_remove_software_node(tcpm->tcpc.fwnode);
126+
fwnode_handle_put(tcpm->tcpc.fwnode);
127127

128128
return ret;
129129
}
@@ -135,7 +135,7 @@ static void qcom_pmic_typec_remove(struct platform_device *pdev)
135135
tcpm->pdphy_stop(tcpm);
136136
tcpm->port_stop(tcpm);
137137
tcpm_unregister_port(tcpm->tcpm_port);
138-
fwnode_remove_software_node(tcpm->tcpc.fwnode);
138+
fwnode_handle_put(tcpm->tcpc.fwnode);
139139
}
140140

141141
static const struct pmic_typec_resources pm8150b_typec_res = {

0 commit comments

Comments
 (0)