* kernel test robot <lkp@xxxxxxxxx> [230508 23:13]: > >> drivers/tty/serial/serial_base_bus.c:97:13: warning: variable 'id' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] > } else if (type == &serial_port_type) { > ^~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/tty/serial/serial_base_bus.c:102:77: note: uninitialized use occurs here > err = dev_set_name(&sbd->dev, "%s.%s.%d", type->name, dev_name(port->dev), id); > ^~ > drivers/tty/serial/serial_base_bus.c:97:9: note: remove the 'if' if its condition is always true > } else if (type == &serial_port_type) { > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/tty/serial/serial_base_bus.c:83:13: note: initialize the variable 'id' to silence this warning > int err, id; > ^ > = 0 > 1 warning generated. Thanks I'll just add else goto err_free_dev for unknown types. Regards, Tony