CC: [email protected]
TO: [email protected]
TO: Guenter Roeck <[email protected]>

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel 
chromeos-5.10
head:   055c73913dc220e483790c1ebf78b39f97220dac
commit: 98e43a40b551c910efd7c6afaa32b66c67d22dc4 [99/235] UPSTREAM: usb: typec: 
Port mapping utility
:::::: branch date: 11 days ago
:::::: commit date: 2 weeks ago
config: x86_64-randconfig-m031-20211203 
(https://download.01.org/0day-ci/archive/20211207/[email protected]/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
drivers/usb/typec/port-mapper.c:168 typec_link_port() warn: missing error code 
'ret'

vim +/ret +168 drivers/usb/typec/port-mapper.c

98e43a40b551c9 Heikki Krogerus 2021-04-07  146  
98e43a40b551c9 Heikki Krogerus 2021-04-07  147  /**
98e43a40b551c9 Heikki Krogerus 2021-04-07  148   * typec_link_port - Link a 
port to its connector
98e43a40b551c9 Heikki Krogerus 2021-04-07  149   * @port: The port device
98e43a40b551c9 Heikki Krogerus 2021-04-07  150   *
98e43a40b551c9 Heikki Krogerus 2021-04-07  151   * Find the connector of @port 
and create symlink named "connector" for it.
98e43a40b551c9 Heikki Krogerus 2021-04-07  152   * Returns 0 on success, or 
errno in case of a failure.
98e43a40b551c9 Heikki Krogerus 2021-04-07  153   *
98e43a40b551c9 Heikki Krogerus 2021-04-07  154   * NOTE. The function 
increments the reference count of @port on success.
98e43a40b551c9 Heikki Krogerus 2021-04-07  155   */
98e43a40b551c9 Heikki Krogerus 2021-04-07  156  int typec_link_port(struct 
device *port)
98e43a40b551c9 Heikki Krogerus 2021-04-07  157  {
98e43a40b551c9 Heikki Krogerus 2021-04-07  158          struct device 
*connector;
98e43a40b551c9 Heikki Krogerus 2021-04-07  159          struct port_node *node;
98e43a40b551c9 Heikki Krogerus 2021-04-07  160          int ret = 0;
98e43a40b551c9 Heikki Krogerus 2021-04-07  161  
98e43a40b551c9 Heikki Krogerus 2021-04-07  162          node = 
create_port_node(port);
98e43a40b551c9 Heikki Krogerus 2021-04-07  163          if (IS_ERR(node))
98e43a40b551c9 Heikki Krogerus 2021-04-07  164                  return 
PTR_ERR(node);
98e43a40b551c9 Heikki Krogerus 2021-04-07  165  
98e43a40b551c9 Heikki Krogerus 2021-04-07  166          connector = 
find_connector(node);
98e43a40b551c9 Heikki Krogerus 2021-04-07  167          if (!connector)
98e43a40b551c9 Heikki Krogerus 2021-04-07 @168                  goto 
remove_node;
98e43a40b551c9 Heikki Krogerus 2021-04-07  169  
98e43a40b551c9 Heikki Krogerus 2021-04-07  170          ret = 
link_port(to_typec_port(connector), node);
98e43a40b551c9 Heikki Krogerus 2021-04-07  171          if (ret)
98e43a40b551c9 Heikki Krogerus 2021-04-07  172                  goto 
put_connector;
98e43a40b551c9 Heikki Krogerus 2021-04-07  173  
98e43a40b551c9 Heikki Krogerus 2021-04-07  174          return 0;
98e43a40b551c9 Heikki Krogerus 2021-04-07  175  
98e43a40b551c9 Heikki Krogerus 2021-04-07  176  put_connector:
98e43a40b551c9 Heikki Krogerus 2021-04-07  177          put_device(connector);
98e43a40b551c9 Heikki Krogerus 2021-04-07  178  remove_node:
98e43a40b551c9 Heikki Krogerus 2021-04-07  179          remove_port_node(node);
98e43a40b551c9 Heikki Krogerus 2021-04-07  180  
98e43a40b551c9 Heikki Krogerus 2021-04-07  181          return ret;
98e43a40b551c9 Heikki Krogerus 2021-04-07  182  }
98e43a40b551c9 Heikki Krogerus 2021-04-07  183  
EXPORT_SYMBOL_GPL(typec_link_port);
98e43a40b551c9 Heikki Krogerus 2021-04-07  184  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to