lib: utils/serial: Initialize platform_uart_data to zero
authorAndrew Jones <ajones@ventanamicro.com>
Mon, 18 Jul 2022 17:20:26 +0000 (19:20 +0200)
committerAnup Patel <anup@brainfault.org>
Sat, 30 Jul 2022 06:09:10 +0000 (11:39 +0530)
commit7d28d3be50c5f8b9e4780a305ab3c39062e486c1
tree5a4cfc8ec0038fd3ecc327fd13938ac69085e985
parent8e86b23db9cab91d395c53d461b012ff69e63f64
lib: utils/serial: Initialize platform_uart_data to zero

While it doesn't look like there are any current cases of using
uninitialized data, let's zero all the UART data members to be
safe. Zero may not actually be better than a random number in
some cases, so all structure members should still be validated
before use, but at least zero is usually easier to debug than
some random stack garbage...

Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/utils/serial/fdt_serial_gaisler.c
lib/utils/serial/fdt_serial_shakti.c
lib/utils/serial/fdt_serial_sifive.c
lib/utils/serial/fdt_serial_uart8250.c
lib/utils/serial/fdt_serial_xlnx_uartlite.c
platform/fpga/openpiton/platform.c