[PATCH] tty: serial/crisv10.c: remove unnecessary null pointer check

From: Cong Ding
Date: Wed Jan 16 2013 - 17:36:43 EST


The pointer tty is dereferened in line 3135, so it is not necessary to check
null again in line 3140.

Signed-off-by: Cong Ding <dinggnu@xxxxxxxxx>
---
drivers/tty/serial/crisv10.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c
index 35ee6a2..3b24965 100644
--- a/drivers/tty/serial/crisv10.c
+++ b/drivers/tty/serial/crisv10.c
@@ -3137,7 +3137,7 @@ static int rs_raw_write(struct tty_struct *tty,

/* first some sanity checks */

- if (!tty || !info->xmit.buf)
+ if (!info->xmit.buf)
return 0;

#ifdef SERIAL_DEBUG_DATA
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/