serial: 8250: Check for valid console index
authorTony Lindgren <tony@atomide.com>
Wed, 4 Oct 2023 08:55:10 +0000 (11:55 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Oct 2023 07:41:17 +0000 (09:41 +0200)
commitb9cbe7e8f27b4e4ab38db5ba5634d12f86574ca7
treeb95f207a66a059c7ed591072379f68c9a1254d6c
parent0d447e927ee86e9ff89010085a47a275c2bb5594
serial: 8250: Check for valid console index

Let's not allow negative numbers for console index.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20231004085511.42645-1-tony@atomide.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_core.c