[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1358375444-13026-1-git-send-email-dinggnu@gmail.com>
Date: Wed, 16 Jan 2013 23:30:43 +0100
From: Cong Ding <dinggnu@...il.com>
To: Alan Cox <alan@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.cz>, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Cong Ding <dinggnu@...il.com>
Subject: [PATCH] tty: serial/68328serial.c: remove unnecessary null pointer check
The pointer info is dereferened in line 1009, so it is not necessary to check
null again in line 1012.
Signed-off-by: Cong Ding <dinggnu@...il.com>
---
drivers/tty/serial/68328serial.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
index f99a845..4f7c0d2 100644
--- a/drivers/tty/serial/68328serial.c
+++ b/drivers/tty/serial/68328serial.c
@@ -1009,7 +1009,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
m68328_uart *uart = &uart_addr[info->line];
unsigned long flags;
- if (!info || serial_paranoia_check(info, tty->name, "rs_close"))
+ if (serial_paranoia_check(info, tty->name, "rs_close"))
return;
local_irq_save(flags);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists