All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Hector Martin <marcan@marcan.st>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sven Peter <sven@kernel.org>, Neal Gompa <neal@gompa.dev>,
	Ethan Tidmore <ethantidmore06@gmail.com>,
	Peter Korsgaard <peter@korsgaard.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH next] usb: typec: tipd: Fix error code in tps6598x_probe()
Date: Mon, 18 May 2026 13:06:04 +0300	[thread overview]
Message-ID: <agrkjOD-VIPwsJO_@kuha> (raw)
In-Reply-To: <agL9o7wUK1dOVBTy@stanley.mountain>

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

      reply	other threads:[~2026-05-18 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=agrkjOD-VIPwsJO_@kuha \
    --to=heikki.krogerus@linux.intel.com \
    --cc=error27@gmail.com \
    --cc=ethantidmore06@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=marcan@marcan.st \
    --cc=neal@gompa.dev \
    --cc=peter@korsgaard.com \
    --cc=sven@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.