diff options
| author | Weijie Gao <[email protected]> | 2023-07-19 17:16:07 +0800 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-08-03 09:40:49 -0400 |
| commit | 0fd96bf224c1af7f8fc3bbdc814eba0349d0c334 (patch) | |
| tree | 0ff82f6ff589da606ebfa5a1c1b3cb82e79b74a1 | |
| parent | b43512d0468a7e409fc2a8d5130d5a2efdee1b3f (diff) | |
serial: mtk: initial priv data before using
This patch ensures driver private data being fully initialized in
_debug_uart_init which is not covered by .priv_auto ops.
Signed-off-by: Sam Shih <[email protected]>
Signed-off-by: Weijie Gao <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
| -rw-r--r-- | drivers/serial/serial_mtk.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c index ded7346a13f..2dffa14ea75 100644 --- a/drivers/serial/serial_mtk.c +++ b/drivers/serial/serial_mtk.c @@ -439,6 +439,7 @@ static inline void _debug_uart_init(void) { struct mtk_serial_priv priv; + memset(&priv, 0, sizeof(struct mtk_serial_priv)); priv.regs = (void *) CONFIG_VAL(DEBUG_UART_BASE); priv.fixed_clk_rate = CONFIG_DEBUG_UART_CLOCK; |
