Re: [PATCH v10 1/1] serial: core: Start managing serial controllers to enable runtime PM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux