kernel/panic.c: filter out a potential trailing newline