From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [bug report] usb: typec: Port mapping utility
Date: Wed, 14 Apr 2021 09:37:48 +0300 [thread overview]
Message-ID: <YHaNvJwd8XXFWVap@kuha.fi.intel.com> (raw)
In-Reply-To: <YHXpocjNVY7MyXzJ@mwanda>
On Tue, Apr 13, 2021 at 09:57:37PM +0300, Dan Carpenter wrote:
> Hello Heikki Krogerus,
>
> The patch ae196ddb0d31: "usb: typec: Port mapping utility" from Apr
> 7, 2021, leads to the following static checker warning:
>
> drivers/usb/typec/port-mapper.c:168 typec_link_port()
> warn: missing error code 'ret'
>
> drivers/usb/typec/port-mapper.c
> 156 int typec_link_port(struct device *port)
> 157 {
> 158 struct device *connector;
> 159 struct port_node *node;
> 160 int ret = 0;
> 161
> 162 node = create_port_node(port);
> 163 if (IS_ERR(node))
> 164 return PTR_ERR(node);
> 165
> 166 connector = find_connector(node);
> 167 if (!connector)
> 168 goto remove_node;
>
> Set error code?
False positive in this case. Not an error.
thanks,
> 169
> 170 ret = link_port(to_typec_port(connector), node);
> 171 if (ret)
> 172 goto put_connector;
> 173
> 174 return 0;
> 175
> 176 put_connector:
> 177 put_device(connector);
> 178 remove_node:
> 179 remove_port_node(node);
> 180
> 181 return ret;
> 182 }
--
heikki
prev parent reply other threads:[~2021-04-14 6:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 18:57 [bug report] usb: typec: Port mapping utility Dan Carpenter
2021-04-14 6:37 ` 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=YHaNvJwd8XXFWVap@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=dan.carpenter@oracle.com \
--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: 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