mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
fiq_debugger: Sanity check state in fiq_tty_proc_show
The fiq_tty_proc_show can be called even when fiq is not enabled in dts, which would cause crash. Add sanity check to avoid that. Change-Id: I69d34718f91813aed14c542901060e4fd68b818b Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
@@ -1217,6 +1217,8 @@ static int fiq_tty_proc_show(struct seq_file *m, void *v)
|
||||
seq_puts(m, "fiq-debugger driver\n");
|
||||
for (i = 0; i < MAX_FIQ_DEBUGGER_PORTS; i++) {
|
||||
state = states[i];
|
||||
if (!state)
|
||||
continue;
|
||||
|
||||
seq_printf(m, "%d:", i);
|
||||
seq_printf(m, " state:%d", state->console_enable);
|
||||
|
||||
Reference in New Issue
Block a user