PERFORCE change 117055 for review

Hans Petter Selasky hselasky at FreeBSD.org
Sun Apr 1 06:37:51 UTC 2007


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

Change 117055 by hselasky at hselasky_mini_itx on 2007/04/01 06:36:56

	Bugfix: Check if ucom_pre_param is non-NULL before
	calling it.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/ucom.c#15 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/ucom.c#15 (text+ko) ====

@@ -961,11 +961,13 @@
 	tp->t_ospeed = t->c_ospeed;
 	tp->t_cflag = t->c_cflag;
 
-	/* Let the lower layer verify the parameters */
-	error = (sc->sc_callback->ucom_pre_param)(sc, t);
-	if (error) {
-	    DPRINTF(0, "callback error = %d\n", error);
-	    goto done;
+	if (sc->sc_callback->ucom_pre_param) {
+	    /* Let the lower layer verify the parameters */
+	    error = (sc->sc_callback->ucom_pre_param)(sc, t);
+	    if (error) {
+		DPRINTF(0, "callback error = %d\n", error);
+		goto done;
+	    }
 	}
 
 	/* Make a copy of the termios parameters */


More information about the p4-projects mailing list