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]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux