Linux USB
 help / color / mirror / Atom feed
* [PATCH next] usb: typec: tipd: Fix error code in tps6598x_probe()
@ 2026-05-12 10:14 Dan Carpenter
  2026-05-18 10:06 ` Heikki Krogerus
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2026-05-12 10:14 UTC (permalink / raw)
  To: Hector Martin
  Cc: Heikki Krogerus, Greg Kroah-Hartman, Sven Peter, Neal Gompa,
	Ethan Tidmore, Peter Korsgaard, linux-usb, linux-kernel,
	kernel-janitors

Set the error code on these two error paths.  The existing code returns
success.

Fixes: 77ed2f4538da ("usb: typec: tipd: Use read_power_status function in probe")
Fixes: 04041fd7d6ec ("usb: typec: tipd: Read data status in probe and cache its value")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
 drivers/usb/typec/tipd/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 43faec794b95..d0b769333bd9 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -1835,6 +1835,7 @@ static int tps6598x_probe(struct i2c_client *client)
 		goto err_role_put;
 
 	if (status & TPS_STATUS_PLUG_PRESENT) {
+		ret = -EINVAL;
 		if (!tps6598x_read_power_status(tps))
 			goto err_unregister_port;
 		if (!tps->data->read_data_status(tps))
-- 
2.53.0


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

* Re: [PATCH next] usb: typec: tipd: Fix error code in tps6598x_probe()
  2026-05-12 10:14 [PATCH next] usb: typec: tipd: Fix error code in tps6598x_probe() Dan Carpenter
@ 2026-05-18 10:06 ` Heikki Krogerus
  0 siblings, 0 replies; 2+ messages in thread
From: Heikki Krogerus @ 2026-05-18 10:06 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Hector Martin, Greg Kroah-Hartman, Sven Peter, Neal Gompa,
	Ethan Tidmore, Peter Korsgaard, linux-usb, linux-kernel,
	kernel-janitors

Tue, May 12, 2026 at 01:14:59PM +0300, Dan Carpenter kirjoitti:
> Set the error code on these two error paths.  The existing code returns
> success.
> 
> Fixes: 77ed2f4538da ("usb: typec: tipd: Use read_power_status function in probe")
> Fixes: 04041fd7d6ec ("usb: typec: tipd: Read data status in probe and cache its value")
> Signed-off-by: Dan Carpenter <error27@gmail.com>

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

> ---
>  drivers/usb/typec/tipd/core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 43faec794b95..d0b769333bd9 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -1835,6 +1835,7 @@ static int tps6598x_probe(struct i2c_client *client)
>  		goto err_role_put;
>  
>  	if (status & TPS_STATUS_PLUG_PRESENT) {
> +		ret = -EINVAL;
>  		if (!tps6598x_read_power_status(tps))
>  			goto err_unregister_port;
>  		if (!tps->data->read_data_status(tps))
> -- 
> 2.53.0

-- 
heikki

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

end of thread, other threads:[~2026-05-18 10:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 10:14 [PATCH next] usb: typec: tipd: Fix error code in tps6598x_probe() Dan Carpenter
2026-05-18 10:06 ` Heikki Krogerus

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