summaryrefslogtreecommitdiffstats
path: root/kernel/debug/gdbstub.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-03-16 13:17:13 +0100
committerJason Wessel <jason.wessel@windriver.com>2012-03-22 15:07:15 -0500
commit9fbe465efc76044dd87afe764db5464ae61aeabc (patch)
treeb01f5206d050f29875438cc1d2e51a7190fc1c0c /kernel/debug/gdbstub.c
parent639077fb69aec8112e5427210a83d0fb192969f0 (diff)
downloadlinux-stable-9fbe465efc76044dd87afe764db5464ae61aeabc.tar.gz
linux-stable-9fbe465efc76044dd87afe764db5464ae61aeabc.tar.bz2
linux-stable-9fbe465efc76044dd87afe764db5464ae61aeabc.zip
kgdb: Respect that flush op is optional
Not all kgdb I/O drivers implement a flush operation. Adjust gdbstub_exit accordingly. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'kernel/debug/gdbstub.c')
-rw-r--r--kernel/debug/gdbstub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/debug/gdbstub.c b/kernel/debug/gdbstub.c
index c22d8c28ad84..5a155742ae96 100644
--- a/kernel/debug/gdbstub.c
+++ b/kernel/debug/gdbstub.c
@@ -1129,5 +1129,6 @@ void gdbstub_exit(int status)
dbg_io_ops->write_char(hex_asc_lo(checksum));
/* make sure the output is flushed, lest the bootloader clobber it */
- dbg_io_ops->flush();
+ if (dbg_io_ops->flush)
+ dbg_io_ops->flush();
}