mirror-linux/drivers/tty
Guenter Roeck 4e450dfd0f tty: serial: Work around warning backtrace in serial8250_set_defaults
Commit 7c7e6c8924 ("tty: serial: handle HAS_IOPORT dependencies")
triggers warning backtraces on a number of platforms which don't support
IO ports.

WARNING: CPU: 0 PID: 0 at drivers/tty/serial/8250/8250_port.c:470 serial8250_set_defaults+0x148/0x1d8
Unsupported UART type 0

The problem is seen because serial8250_set_defaults() is called for
all members of the serial8250_ports[] array even if that array is
not initialized.

Work around the problem by only displaying the warning if the port
type is not 0 (UPIO_PORT) or if iobase is set for the port.

Fixes: 7c7e6c8924 ("tty: serial: handle HAS_IOPORT dependencies")
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Stafford Horne <shorne@gmail.com>
Link: https://lore.kernel.org/r/20241205143033.2695333-1-linux@roeck-us.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-06 08:00:01 +01:00
..
hvc Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ipwireless
serdev serdev: Use of_property_present() 2024-08-07 13:08:14 +02:00
serial tty: serial: Work around warning backtrace in serial8250_set_defaults 2024-12-06 08:00:01 +01:00
vt vt: prevent kernel-infoleak in con_font_get() 2024-10-11 08:27:36 +02:00
Kconfig tty: serial: handle HAS_IOPORT dependencies 2024-10-28 21:44:28 +00:00
Makefile
amiserial.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ehv_bytechan.c
goldfish.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
mips_ejtag_fdc.c tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning 2024-02-23 10:14:16 +01:00
moxa.c
mxser.c mxser: convert comma to semicolon 2024-09-03 10:47:47 +02:00
n_gsm.c tty: n_gsm: Fix use-after-free in gsm_cleanup_mux 2024-10-11 08:28:17 +02:00
n_hdlc.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00
n_null.c
n_tty.c tty: n_tty: Fix buffer offsets when lookahead is used 2024-06-04 14:07:27 +02:00
nozomi.c
pty.c
rpmsg_tty.c
synclink_gt.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00
sysrq.c printk changes for 6.13 2024-11-20 09:21:11 -08:00
tty.h
tty_audit.c
tty_baudrate.c
tty_buffer.c tty: Don't include tty_buffer.h in tty.h 2024-02-18 18:59:59 +01:00
tty_io.c tty: ldsic: fix tty_ldisc_autoload sysctl's proc_handler 2024-11-13 15:12:19 +01:00
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c tty: add the option to have a tty reject a new ldisc 2024-05-04 18:45:11 +02:00
tty_ldsem.c
tty_mutex.c
tty_port.c
ttynull.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00
vcc.c