summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-12-04 14:06:36 +0100
committerAdrian Bunk <bunk@stusta.de>2006-12-04 14:06:36 +0100
commit407e973fcc4bf33964851f2f01817c1958479868 (patch)
tree77bee0f2f44a99e6175dae7c3bce4d200955a1b5 /drivers
parent2491185f7a9a5592dba42547ffff1f56bf5af66f (diff)
Char: isicom, fix close bug
port is dereferenced even if it is NULL. Dereference it _after_ the check if (!port)... Thanks Eric <ef87@yahoo.com> for reporting this. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=7527 Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/isicom.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index e9ebabaf8cb0..58da5ddeab45 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -1062,11 +1062,12 @@ static void isicom_shutdown_port(struct isi_port *port)
static void isicom_close(struct tty_struct *tty, struct file *filp)
{
struct isi_port *port = tty->driver_data;
- struct isi_board *card = port->card;
+ struct isi_board *card;
unsigned long flags;
if (!port)
return;
+ card = port->card;
if (isicom_paranoia_check(port, tty->name, "isicom_close"))
return;