public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path
@ 2024-10-20 12:56 Javier Carrasco
  2024-10-20 12:56 ` [PATCH v2 1/2] usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes Javier Carrasco
  2024-10-20 12:56 ` [PATCH v2 2/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path Javier Carrasco
  0 siblings, 2 replies; 9+ messages in thread
From: Javier Carrasco @ 2024-10-20 12:56 UTC (permalink / raw)
  To: Bryan O'Donoghue, Heikki Krogerus, Greg Kroah-Hartman,
	Dmitry Baryshkov, Caleb Connolly, Guenter Roeck
  Cc: linux-arm-msm, linux-usb, linux-kernel, Javier Carrasco, stable

This series fixes the handling of an fwnode that is not released in all
error paths and uses the wrong function to release it (spotted by Dmitry
Baryshkov).

To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Caleb Connolly <caleb.connolly@linaro.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>

Changes in v2:
- add patch to use fwnode_handle_put() instead of
  fwnode_remove_software-node().
- Link to v1: https://lore.kernel.org/r/20241019-qcom_pmic_typec-fwnode_remove-v1-1-884968902979@gmail.com

---
Javier Carrasco (2):
      usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes
      usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path

 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
base-commit: f2493655d2d3d5c6958ed996b043c821c23ae8d3
change-id: 20241019-qcom_pmic_typec-fwnode_remove-00dc49054cf7

Best regards,
-- 
Javier Carrasco <javier.carrasco.cruz@gmail.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/2] usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes
  2024-10-20 12:56 [PATCH v2 0/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path Javier Carrasco
@ 2024-10-20 12:56 ` Javier Carrasco
  2024-10-20 13:15   ` Dmitry Baryshkov
                     ` (2 more replies)
  2024-10-20 12:56 ` [PATCH v2 2/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path Javier Carrasco
  1 sibling, 3 replies; 9+ messages in thread
From: Javier Carrasco @ 2024-10-20 12:56 UTC (permalink / raw)
  To: Bryan O'Donoghue, Heikki Krogerus, Greg Kroah-Hartman,
	Dmitry Baryshkov, Caleb Connolly, Guenter Roeck
  Cc: linux-arm-msm, linux-usb, linux-kernel, Javier Carrasco, stable

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: stable@vger.kernel.org
Fixes: a4422ff22142 ("usb: typec: qcom: Add Qualcomm PMIC Type-C driver")
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
index 2201eeae5a99..73a159e67ec2 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
@@ -123,7 +123,7 @@ static int qcom_pmic_typec_probe(struct platform_device *pdev)
 port_unregister:
 	tcpm_unregister_port(tcpm->tcpm_port);
 fwnode_remove:
-	fwnode_remove_software_node(tcpm->tcpc.fwnode);
+	fwnode_handle_put(tcpm->tcpc.fwnode);
 
 	return ret;
 }
@@ -135,7 +135,7 @@ static void qcom_pmic_typec_remove(struct platform_device *pdev)
 	tcpm->pdphy_stop(tcpm);
 	tcpm->port_stop(tcpm);
 	tcpm_unregister_port(tcpm->tcpm_port);
-	fwnode_remove_software_node(tcpm->tcpc.fwnode);
+	fwnode_handle_put(tcpm->tcpc.fwnode);
 }
 
 static const struct pmic_typec_resources pm8150b_typec_res = {

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path
  2024-10-20 12:56 [PATCH v2 0/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path Javier Carrasco
  2024-10-20 12:56 ` [PATCH v2 1/2] usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes Javier Carrasco
@ 2024-10-20 12:56 ` Javier Carrasco
  2024-10-20 13:15   ` Dmitry Baryshkov
                     ` (2 more replies)
  1 sibling, 3 replies; 9+ messages in thread
From: Javier Carrasco @ 2024-10-20 12:56 UTC (permalink / raw)
  To: Bryan O'Donoghue, Heikki Krogerus, Greg Kroah-Hartman,
	Dmitry Baryshkov, Caleb Connolly, Guenter Roeck
  Cc: linux-arm-msm, linux-usb, linux-kernel, Javier Carrasco, stable

If drm_dp_hpd_bridge_register() fails, the probe function returns
without removing the fwnode via fwnode_handle_put(), leaking the
resource.

Jump to fwnode_remove if drm_dp_hpd_bridge_register() fails to remove
the fwnode acquired with device_get_named_child_node().

Cc: stable@vger.kernel.org
Fixes: 7d9f1b72b296 ("usb: typec: qcom-pmic-typec: switch to DRM_AUX_HPD_BRIDGE")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
index 73a159e67ec2..3766790c1548 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
@@ -93,8 +93,10 @@ static int qcom_pmic_typec_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	bridge_dev = devm_drm_dp_hpd_bridge_alloc(tcpm->dev, to_of_node(tcpm->tcpc.fwnode));
-	if (IS_ERR(bridge_dev))
-		return PTR_ERR(bridge_dev);
+	if (IS_ERR(bridge_dev)) {
+		ret = PTR_ERR(bridge_dev);
+		goto fwnode_remove;
+	}
 
 	tcpm->tcpm_port = tcpm_register_port(tcpm->dev, &tcpm->tcpc);
 	if (IS_ERR(tcpm->tcpm_port)) {

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/2] usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes
  2024-10-20 12:56 ` [PATCH v2 1/2] usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes Javier Carrasco
@ 2024-10-20 13:15   ` Dmitry Baryshkov
  2024-10-20 18:33   ` Bryan O'Donoghue
  2024-10-21 13:01   ` Heikki Krogerus
  2 siblings, 0 replies; 9+ messages in thread
From: Dmitry Baryshkov @ 2024-10-20 13:15 UTC (permalink / raw)
  To: Javier Carrasco
  Cc: Bryan O'Donoghue, Heikki Krogerus, Greg Kroah-Hartman,
	Caleb Connolly, Guenter Roeck, linux-arm-msm, linux-usb,
	linux-kernel, stable

On Sun, Oct 20, 2024 at 02:56:34PM +0200, Javier Carrasco wrote:
> 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: stable@vger.kernel.org
> Fixes: a4422ff22142 ("usb: typec: qcom: Add Qualcomm PMIC Type-C driver")
> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
>  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path
  2024-10-20 12:56 ` [PATCH v2 2/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path Javier Carrasco
@ 2024-10-20 13:15   ` Dmitry Baryshkov
  2024-10-20 18:30   ` Bryan O'Donoghue
  2024-10-21 13:01   ` Heikki Krogerus
  2 siblings, 0 replies; 9+ messages in thread
From: Dmitry Baryshkov @ 2024-10-20 13:15 UTC (permalink / raw)
  To: Javier Carrasco
  Cc: Bryan O'Donoghue, Heikki Krogerus, Greg Kroah-Hartman,
	Caleb Connolly, Guenter Roeck, linux-arm-msm, linux-usb,
	linux-kernel, stable

On Sun, Oct 20, 2024 at 02:56:35PM +0200, Javier Carrasco wrote:
> If drm_dp_hpd_bridge_register() fails, the probe function returns
> without removing the fwnode via fwnode_handle_put(), leaking the
> resource.
> 
> Jump to fwnode_remove if drm_dp_hpd_bridge_register() fails to remove
> the fwnode acquired with device_get_named_child_node().
> 
> Cc: stable@vger.kernel.org
> Fixes: 7d9f1b72b296 ("usb: typec: qcom-pmic-typec: switch to DRM_AUX_HPD_BRIDGE")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
>  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path
  2024-10-20 12:56 ` [PATCH v2 2/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path Javier Carrasco
  2024-10-20 13:15   ` Dmitry Baryshkov
@ 2024-10-20 18:30   ` Bryan O'Donoghue
  2024-10-21 13:01   ` Heikki Krogerus
  2 siblings, 0 replies; 9+ messages in thread
From: Bryan O'Donoghue @ 2024-10-20 18:30 UTC (permalink / raw)
  To: Javier Carrasco, Heikki Krogerus, Greg Kroah-Hartman,
	Dmitry Baryshkov, Caleb Connolly, Guenter Roeck
  Cc: linux-arm-msm, linux-usb, linux-kernel, stable

On 20/10/2024 13:56, Javier Carrasco wrote:
> If drm_dp_hpd_bridge_register() fails, the probe function returns
> without removing the fwnode via fwnode_handle_put(), leaking the
> resource.
> 
> Jump to fwnode_remove if drm_dp_hpd_bridge_register() fails to remove
> the fwnode acquired with device_get_named_child_node().
> 
> Cc: stable@vger.kernel.org
> Fixes: 7d9f1b72b296 ("usb: typec: qcom-pmic-typec: switch to DRM_AUX_HPD_BRIDGE")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
>   drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> index 73a159e67ec2..3766790c1548 100644
> --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> @@ -93,8 +93,10 @@ static int qcom_pmic_typec_probe(struct platform_device *pdev)
>   		return -EINVAL;
>   
>   	bridge_dev = devm_drm_dp_hpd_bridge_alloc(tcpm->dev, to_of_node(tcpm->tcpc.fwnode));
> -	if (IS_ERR(bridge_dev))
> -		return PTR_ERR(bridge_dev);
> +	if (IS_ERR(bridge_dev)) {
> +		ret = PTR_ERR(bridge_dev);
> +		goto fwnode_remove;
> +	}
>   
>   	tcpm->tcpm_port = tcpm_register_port(tcpm->dev, &tcpm->tcpc);
>   	if (IS_ERR(tcpm->tcpm_port)) {
> 
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/2] usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes
  2024-10-20 12:56 ` [PATCH v2 1/2] usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes Javier Carrasco
  2024-10-20 13:15   ` Dmitry Baryshkov
@ 2024-10-20 18:33   ` Bryan O'Donoghue
  2024-10-21 13:01   ` Heikki Krogerus
  2 siblings, 0 replies; 9+ messages in thread
From: Bryan O'Donoghue @ 2024-10-20 18:33 UTC (permalink / raw)
  To: Javier Carrasco, Heikki Krogerus, Greg Kroah-Hartman,
	Dmitry Baryshkov, Caleb Connolly, Guenter Roeck
  Cc: linux-arm-msm, linux-usb, linux-kernel, stable

On 20/10/2024 13:56, Javier Carrasco wrote:
> 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: stable@vger.kernel.org
> Fixes: a4422ff22142 ("usb: typec: qcom: Add Qualcomm PMIC Type-C driver")
> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
>   drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> index 2201eeae5a99..73a159e67ec2 100644
> --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> @@ -123,7 +123,7 @@ static int qcom_pmic_typec_probe(struct platform_device *pdev)
>   port_unregister:
>   	tcpm_unregister_port(tcpm->tcpm_port);
>   fwnode_remove:
> -	fwnode_remove_software_node(tcpm->tcpc.fwnode);
> +	fwnode_handle_put(tcpm->tcpc.fwnode);
>   
>   	return ret;
>   }
> @@ -135,7 +135,7 @@ static void qcom_pmic_typec_remove(struct platform_device *pdev)
>   	tcpm->pdphy_stop(tcpm);
>   	tcpm->port_stop(tcpm);
>   	tcpm_unregister_port(tcpm->tcpm_port);
> -	fwnode_remove_software_node(tcpm->tcpc.fwnode);
> +	fwnode_handle_put(tcpm->tcpc.fwnode);
>   }
>   
>   static const struct pmic_typec_resources pm8150b_typec_res = {
> 
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/2] usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes
  2024-10-20 12:56 ` [PATCH v2 1/2] usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes Javier Carrasco
  2024-10-20 13:15   ` Dmitry Baryshkov
  2024-10-20 18:33   ` Bryan O'Donoghue
@ 2024-10-21 13:01   ` Heikki Krogerus
  2 siblings, 0 replies; 9+ messages in thread
From: Heikki Krogerus @ 2024-10-21 13:01 UTC (permalink / raw)
  To: Javier Carrasco
  Cc: Bryan O'Donoghue, Greg Kroah-Hartman, Dmitry Baryshkov,
	Caleb Connolly, Guenter Roeck, linux-arm-msm, linux-usb,
	linux-kernel, stable

On Sun, Oct 20, 2024 at 02:56:34PM +0200, Javier Carrasco wrote:
> 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: stable@vger.kernel.org
> Fixes: a4422ff22142 ("usb: typec: qcom: Add Qualcomm PMIC Type-C driver")
> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> index 2201eeae5a99..73a159e67ec2 100644
> --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> @@ -123,7 +123,7 @@ static int qcom_pmic_typec_probe(struct platform_device *pdev)
>  port_unregister:
>  	tcpm_unregister_port(tcpm->tcpm_port);
>  fwnode_remove:
> -	fwnode_remove_software_node(tcpm->tcpc.fwnode);
> +	fwnode_handle_put(tcpm->tcpc.fwnode);
>  
>  	return ret;
>  }
> @@ -135,7 +135,7 @@ static void qcom_pmic_typec_remove(struct platform_device *pdev)
>  	tcpm->pdphy_stop(tcpm);
>  	tcpm->port_stop(tcpm);
>  	tcpm_unregister_port(tcpm->tcpm_port);
> -	fwnode_remove_software_node(tcpm->tcpc.fwnode);
> +	fwnode_handle_put(tcpm->tcpc.fwnode);
>  }
>  
>  static const struct pmic_typec_resources pm8150b_typec_res = {
> 
> -- 
> 2.43.0

-- 
heikki

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path
  2024-10-20 12:56 ` [PATCH v2 2/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path Javier Carrasco
  2024-10-20 13:15   ` Dmitry Baryshkov
  2024-10-20 18:30   ` Bryan O'Donoghue
@ 2024-10-21 13:01   ` Heikki Krogerus
  2 siblings, 0 replies; 9+ messages in thread
From: Heikki Krogerus @ 2024-10-21 13:01 UTC (permalink / raw)
  To: Javier Carrasco
  Cc: Bryan O'Donoghue, Greg Kroah-Hartman, Dmitry Baryshkov,
	Caleb Connolly, Guenter Roeck, linux-arm-msm, linux-usb,
	linux-kernel, stable

On Sun, Oct 20, 2024 at 02:56:35PM +0200, Javier Carrasco wrote:
> If drm_dp_hpd_bridge_register() fails, the probe function returns
> without removing the fwnode via fwnode_handle_put(), leaking the
> resource.
> 
> Jump to fwnode_remove if drm_dp_hpd_bridge_register() fails to remove
> the fwnode acquired with device_get_named_child_node().
> 
> Cc: stable@vger.kernel.org
> Fixes: 7d9f1b72b296 ("usb: typec: qcom-pmic-typec: switch to DRM_AUX_HPD_BRIDGE")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> index 73a159e67ec2..3766790c1548 100644
> --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> @@ -93,8 +93,10 @@ static int qcom_pmic_typec_probe(struct platform_device *pdev)
>  		return -EINVAL;
>  
>  	bridge_dev = devm_drm_dp_hpd_bridge_alloc(tcpm->dev, to_of_node(tcpm->tcpc.fwnode));
> -	if (IS_ERR(bridge_dev))
> -		return PTR_ERR(bridge_dev);
> +	if (IS_ERR(bridge_dev)) {
> +		ret = PTR_ERR(bridge_dev);
> +		goto fwnode_remove;
> +	}
>  
>  	tcpm->tcpm_port = tcpm_register_port(tcpm->dev, &tcpm->tcpc);
>  	if (IS_ERR(tcpm->tcpm_port)) {
> 
> -- 
> 2.43.0

-- 
heikki

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-10-21 13:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-20 12:56 [PATCH v2 0/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path Javier Carrasco
2024-10-20 12:56 ` [PATCH v2 1/2] usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes Javier Carrasco
2024-10-20 13:15   ` Dmitry Baryshkov
2024-10-20 18:33   ` Bryan O'Donoghue
2024-10-21 13:01   ` Heikki Krogerus
2024-10-20 12:56 ` [PATCH v2 2/2] usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path Javier Carrasco
2024-10-20 13:15   ` Dmitry Baryshkov
2024-10-20 18:30   ` Bryan O'Donoghue
2024-10-21 13:01   ` Heikki Krogerus

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