Linux USB
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Linyu Yuan <quic_linyyuan@quicinc.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, Jack Pham <quic_jackp@quicinc.com>
Subject: Re: [PATCH v3 1/4] usb: typec: ucsi: set con->port to NULL when register port fail
Date: Wed, 13 Apr 2022 14:31:50 +0300	[thread overview]
Message-ID: <Yla0pvOElW+Voh8G@kuha.fi.intel.com> (raw)
In-Reply-To: <1649843891-15554-2-git-send-email-quic_linyyuan@quicinc.com>

On Wed, Apr 13, 2022 at 05:58:08PM +0800, Linyu Yuan wrote:
> As con->port will be used in error path of ucsi_init(),
> it should be NULL or valid.
> 
> Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
> ---
> v2: no change
> v3: no change
> 
>  drivers/usb/typec/ucsi/ucsi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index f0c2fa1..77ac0b7 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -1100,6 +1100,7 @@ static int ucsi_register_port(struct ucsi *ucsi, int index)
>  	con->port = typec_register_port(ucsi->dev, cap);
>  	if (IS_ERR(con->port)) {
>  		ret = PTR_ERR(con->port);
> +		con->port = NULL;
>  		goto out;
>  	}

Please merge this into the next patch.

thanks,

-- 
heikki

  reply	other threads:[~2022-04-13 11:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13  9:58 [PATCH v3 0/4] usb: typec: ucsi: allow retry to find role switch Linyu Yuan
2022-04-13  9:58 ` [PATCH v3 1/4] usb: typec: ucsi: set con->port to NULL when register port fail Linyu Yuan
2022-04-13 11:31   ` Heikki Krogerus [this message]
2022-04-13 13:16     ` Linyu Yuan (QUIC)
2022-04-13  9:58 ` [PATCH v3 2/4] usb: typec: ucsi: add a common function ucsi_unregister_connectors() Linyu Yuan
2022-04-13 12:08   ` Heikki Krogerus
2022-04-13 13:27     ` Linyu Yuan (QUIC)
2022-04-21  8:00       ` Heikki Krogerus
2022-04-21  8:13         ` Linyu Yuan (QUIC)
2022-04-13  9:58 ` [PATCH v3 3/4] usb: typec: ucsi: do not allocate one extra unused connector Linyu Yuan
2022-04-13  9:58 ` [PATCH v3 4/4] usb: typec: ucsi: retry find role swithch when module load late Linyu Yuan
2022-04-13 12:39   ` Heikki Krogerus
2022-04-13 13:42     ` Linyu Yuan (QUIC)
2022-04-21  7:40       ` Linyu Yuan (QUIC)
2022-04-21  7:54         ` Heikki Krogerus

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=Yla0pvOElW+Voh8G@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=quic_jackp@quicinc.com \
    --cc=quic_linyyuan@quicinc.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox