Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] 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: Linus Torvalds <torvalds@osdl.org>

authored by

Jiri Slaby and committed by
Linus Torvalds
c387fd85 f5ad1a78

+2 -1
+2 -1
drivers/char/isicom.c
··· 1062 1062 static void isicom_close(struct tty_struct *tty, struct file *filp) 1063 1063 { 1064 1064 struct isi_port *port = tty->driver_data; 1065 - struct isi_board *card = port->card; 1065 + struct isi_board *card; 1066 1066 unsigned long flags; 1067 1067 1068 1068 if (!port) 1069 1069 return; 1070 + card = port->card; 1070 1071 if (isicom_paranoia_check(port, tty->name, "isicom_close")) 1071 1072 return; 1072 1073