aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayachandran C <jchandra@digeo.com>2005-10-30 18:26:16 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-10-30 18:26:16 -0500
commita2436b22deac7834e0f87897b207a2dc1407dc40 (patch)
tree4c4ad96ee6c55f3fe68605ef5bd1d98aca8d3092
parent9f75e1eff3edb2bb07349b94c28f4f2a6c66ca43 (diff)
[SERIAL] remove unneeded code from serial_core.c
This patch fixes an issue reported by Coverity in serial/serial_core.c Error reported: Variable "&((info)->tty)->flags" tracked as NULL was passed to a function that dereferences it. The later statements in the function assumes 'info->tty != NULL', so this check is not necessary. Probably a 'BUG_ON(info->tty == NULL)' can be added. Signed-off-by: Jayachandran C. <c.jayachandran at gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--drivers/serial/serial_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 2d8622eef701..401d94a7fe2e 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -147,8 +147,7 @@ static int uart_startup(struct uart_state *state, int init_hw)
147 * once we have successfully opened the port. Also set 147 * once we have successfully opened the port. Also set
148 * up the tty->alt_speed kludge 148 * up the tty->alt_speed kludge
149 */ 149 */
150 if (info->tty) 150 set_bit(TTY_IO_ERROR, &info->tty->flags);
151 set_bit(TTY_IO_ERROR, &info->tty->flags);
152 151
153 if (port->type == PORT_UNKNOWN) 152 if (port->type == PORT_UNKNOWN)
154 return 0; 153 return 0;