public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [bug report] usb: typec: Port mapping utility
@ 2021-04-13 18:57 Dan Carpenter
  2021-04-14  6:37 ` Heikki Krogerus
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-04-13 18:57 UTC (permalink / raw)
  To: heikki.krogerus; +Cc: linux-usb

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?

   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  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-14  6:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-13 18:57 [bug report] usb: typec: Port mapping utility Dan Carpenter
2021-04-14  6:37 ` Heikki Krogerus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox