mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
serial: samsung: Fix unintended usage of uart port 0 as console
In s3c24xx_serial_console_setup function, if the uart port that is being setup as a console has not been initialized, an error can be returned instead of using uart port 0 as the default console port. The uart port that was intended to be used as a console could be initialized at a later point during boot and then registered as a console. This will avoid using uart port 0 as a unintended console port. Signed-off-by: Thomas Abraham <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
This commit is contained in:
parent
2c53b436a3
commit
ee430f1625
1 changed files with 2 additions and 4 deletions
|
|
@ -1416,10 +1416,8 @@ s3c24xx_serial_console_setup(struct console *co, char *options)
|
|||
|
||||
/* is the port configured? */
|
||||
|
||||
if (port->mapbase == 0x0) {
|
||||
co->index = 0;
|
||||
port = &s3c24xx_serial_ports[co->index].port;
|
||||
}
|
||||
if (port->mapbase == 0x0)
|
||||
return -ENODEV;
|
||||
|
||||
cons_uart = port;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue