From: Jan Kiszka Date: Fri, 16 Mar 2012 12:17:13 +0000 (+0100) Subject: kgdb: Respect that flush op is optional X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9fbe465efc76044dd87afe764db5464ae61aeabc;p=mv-sheeva.git 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 Signed-off-by: Jason Wessel --- diff --git a/kernel/debug/gdbstub.c b/kernel/debug/gdbstub.c index c22d8c28ad8..5a155742ae9 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(); }