PERFORCE change 148049 for review

Ed Schouten ed at FreeBSD.org
Thu Aug 21 21:32:03 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=148049

Change 148049 by ed at ed_flippo on 2008/08/21 21:31:23

	D'oh! Don't forget to check the return value of
	ttyhook_register() in SNPSTTY.

Affected files ...

.. //depot/projects/mpsafetty/sys/dev/snp/snp.c#9 edit

Differences ...

==== //depot/projects/mpsafetty/sys/dev/snp/snp.c#9 (text+ko) ====

@@ -243,6 +243,8 @@
 		error = ttyhook_register(&ss->snp_tty, td, *(int *)data,
 		    &snp_hook, ss);
 		sx_xunlock(&snp_register_lock);
+		if (error != 0)
+			return (error);
 
 		/* Now that went okay, allocate a buffer for the queue. */
 		tp = ss->snp_tty;
@@ -250,7 +252,7 @@
 		ttyoutq_setsize(&ss->snp_outq, tp, SNP_OUTPUT_BUFSIZE);
 		tty_unlock(tp);
 
-		return (error);
+		return (0);
 	case SNPGTTY:
 		/* Obtain device number of associated TTY. */
 		if (ss->snp_tty == NULL)


More information about the p4-projects mailing list