printk: handle blank console arguments passed in.
If uboot passes a blank string to console_setup then it results in
a trashed memory. Ultimately, the kernel crashes during freeing up
the memory.
This fix checks if there is a blank parameter being
passed to console_setup from uboot. In case it detects that
the console parameter is blank then it doesn't setup the serial
device and it gracefully exits.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Shreyas Joshi <[email protected]>
Acked-by: Sergey Senozhatsky <[email protected]>
[
[email protected]: Better format the commit message and code, remove unnecessary brackets.]
Signed-off-by: Petr Mladek <[email protected]>