patch-2.1.48 linux/drivers/char/tty_io.c

Next file: linux/drivers/char/vga.c
Previous file: linux/drivers/char/sysrq.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.47/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
@@ -688,7 +688,6 @@
 		return -ENODEV;
 
 	idx = MINOR(device) - driver->minor_start;
-	tty = driver->table[idx];
 
 	/* 
 	 * Check whether we need to acquire the tty semaphore to avoid
@@ -697,7 +696,8 @@
 	down_tty_sem(idx);
 
 	/* check whether we're reopening an existing tty */
-	if(tty) goto fast_track;
+	tty = driver->table[idx];
+	if (tty) goto fast_track;
 
 	/*
 	 * First time open is complex, especially for PTY devices.

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov