Re: [PATCH next] usb: typec: tipd: Fix error code in tps6598x_probe()

Heikki Krogerus <[email protected]>
Newsgroups org.kernel.vger.kernel-janitors,org.kernel.vger.linux-kernel,org.kernel.vger.linux-usb
Message-ID <agrkjOD-VIPwsJO_@kuha>
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 <[email protected]>

Reviewed-by: Heikki Krogerus <[email protected]>

> ---
>  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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.