From: Heikki Krogerus <heikki.krogerus@linux.intel.com> To: Dan Carpenter <dan.carpenter@oracle.com> Cc: Amelie Delaunay <amelie.delaunay@st.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH 1/2] usb: typec: stusb160x: fix an IS_ERR() vs NULL check in probe Date: Mon, 26 Oct 2020 10:50:44 +0000 [thread overview] Message-ID: <20201026105044.GA1442058@kuha.fi.intel.com> (raw) In-Reply-To: <20201023112347.GC282278@mwanda> On Fri, Oct 23, 2020 at 02:23:47PM +0300, Dan Carpenter wrote: > The typec_register_port() function doesn't return error pointers, it > returns error pointers. > > Fixes: da0cb6310094 ("usb: typec: add support for STUSB160x Type-C controller family") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> You do need to fix the commit message like Sergei pointed out. Otherwise, FWIW: Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> > --- > drivers/usb/typec/stusb160x.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/typec/stusb160x.c b/drivers/usb/typec/stusb160x.c > index ce0bd7b3ad88..f7369e371dd4 100644 > --- a/drivers/usb/typec/stusb160x.c > +++ b/drivers/usb/typec/stusb160x.c > @@ -729,8 +729,8 @@ static int stusb160x_probe(struct i2c_client *client) > } > > chip->port = typec_register_port(chip->dev, &chip->capability); > - if (!chip->port) { > - ret = -ENODEV; > + if (IS_ERR(chip->port)) { > + ret = PTR_ERR(chip->port); > goto all_reg_disable; > } > > -- > 2.28.0 thanks, -- heikki
WARNING: multiple messages have this Message-ID (diff)
From: Heikki Krogerus <heikki.krogerus@linux.intel.com> To: Dan Carpenter <dan.carpenter@oracle.com> Cc: Amelie Delaunay <amelie.delaunay@st.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH 1/2] usb: typec: stusb160x: fix an IS_ERR() vs NULL check in probe Date: Mon, 26 Oct 2020 12:50:44 +0200 [thread overview] Message-ID: <20201026105044.GA1442058@kuha.fi.intel.com> (raw) In-Reply-To: <20201023112347.GC282278@mwanda> On Fri, Oct 23, 2020 at 02:23:47PM +0300, Dan Carpenter wrote: > The typec_register_port() function doesn't return error pointers, it > returns error pointers. > > Fixes: da0cb6310094 ("usb: typec: add support for STUSB160x Type-C controller family") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> You do need to fix the commit message like Sergei pointed out. Otherwise, FWIW: Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> > --- > drivers/usb/typec/stusb160x.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/typec/stusb160x.c b/drivers/usb/typec/stusb160x.c > index ce0bd7b3ad88..f7369e371dd4 100644 > --- a/drivers/usb/typec/stusb160x.c > +++ b/drivers/usb/typec/stusb160x.c > @@ -729,8 +729,8 @@ static int stusb160x_probe(struct i2c_client *client) > } > > chip->port = typec_register_port(chip->dev, &chip->capability); > - if (!chip->port) { > - ret = -ENODEV; > + if (IS_ERR(chip->port)) { > + ret = PTR_ERR(chip->port); > goto all_reg_disable; > } > > -- > 2.28.0 thanks, -- heikki
next prev parent reply other threads:[~2020-10-26 10:50 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-23 11:23 [PATCH 1/2] usb: typec: stusb160x: fix an IS_ERR() vs NULL check in probe Dan Carpenter 2020-10-23 11:23 ` Dan Carpenter 2020-10-23 11:40 ` [PATCH 1/2 v2] " Dan Carpenter 2020-10-23 11:40 ` Dan Carpenter 2020-10-26 10:52 ` Heikki Krogerus 2020-10-26 10:52 ` Heikki Krogerus 2020-10-28 12:29 ` Amelie DELAUNAY 2020-10-28 12:29 ` Amelie DELAUNAY 2020-10-23 13:56 ` [PATCH 1/2] " Sergei Shtylyov 2020-10-23 13:56 ` Sergei Shtylyov 2020-10-26 10:50 ` Heikki Krogerus [this message] 2020-10-26 10:50 ` 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=20201026105044.GA1442058@kuha.fi.intel.com \ --to=heikki.krogerus@linux.intel.com \ --cc=amelie.delaunay@st.com \ --cc=dan.carpenter@oracle.com \ --cc=gregkh@linuxfoundation.org \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-usb@vger.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: linkBe 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.