[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230509065758.GZ14287@atomide.com>
Date: Tue, 9 May 2023 09:57:58 +0300
From: Tony Lindgren <tony@...mide.com>
To: kernel test robot <lkp@...el.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>, llvm@...ts.linux.dev,
oe-kbuild-all@...ts.linux.dev,
Andy Shevchenko <andriy.shevchenko@...el.com>,
Dhruva Gole <d-gole@...com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Johan Hovold <johan@...nel.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Vignesh Raghavendra <vigneshr@...com>,
linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org
Subject: Re: [PATCH v10 1/1] serial: core: Start managing serial controllers
to enable runtime PM
* kernel test robot <lkp@...el.com> [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
Powered by blists - more mailing lists