Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Apr 2007 06:37:51 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 117055 for review
Message-ID:  <200704010637.l316bp88005439@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=117055

Change 117055 by hselasky@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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704010637.l316bp88005439>