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@xxxxxxxxxxx> > --- > 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