patch-2.4.21 linux-2.4.21/net/irda/ircomm/ircomm_tty.c

Next file: linux-2.4.21/net/irda/irda_device.c
Previous file: linux-2.4.21/net/irda/ircomm/ircomm_core.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/net/irda/ircomm/ircomm_tty.c linux-2.4.21/net/irda/ircomm/ircomm_tty.c
@@ -512,6 +512,9 @@
 	if (!tty)
 		return;
 
+	ASSERT(self != NULL, return;);
+	ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
+
 	save_flags(flags); 
 	cli();
 
@@ -523,9 +526,6 @@
 		return;
 	}
 
-	ASSERT(self != NULL, return;);
-	ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
-
 	if ((tty->count == 1) && (self->open_count != 1)) {
 		/*
 		 * Uh, oh.  tty->count is 1, which means that the tty

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)