Title: [5338] trunk/drivers/serial/bfin_5xx.c: Fix bug[#4440] Always check NULL pointer.
- Revision
- 5338
- Author
- sonicz
- Date
- 2008-09-25 04:02:06 -0500 (Thu, 25 Sep 2008)
Log Message
Fix bug[#4440] Always check NULL pointer.
Modified Paths
Diff
Modified: trunk/drivers/serial/bfin_5xx.c (5337 => 5338)
--- trunk/drivers/serial/bfin_5xx.c 2008-09-25 07:52:15 UTC (rev 5337)
+++ trunk/drivers/serial/bfin_5xx.c 2008-09-25 09:02:06 UTC (rev 5338)
@@ -171,14 +171,14 @@
#if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \
defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE)
- if (kgdb_connected && kgdboc_port_line == uart->port.line) {
+ if (kgdb_connected && kgdboc_port_line == uart->port.line)
if (ch == 0x3) {/* Ctrl + C */
kgdb_breakpoint();
return;
}
- if (!uart->port.info)
- return;
- }
+
+ if (!uart->port.info || !uart->port.info->tty)
+ return;
#endif
tty = uart->port.info->tty;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits