From owner-p4-projects@FreeBSD.ORG Sun Apr 1 06:37:51 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8DBCB16A406; Sun, 1 Apr 2007 06:37:51 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6483916A404 for ; Sun, 1 Apr 2007 06:37:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 5490113C448 for ; Sun, 1 Apr 2007 06:37:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l316bpQC005442 for ; Sun, 1 Apr 2007 06:37:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l316bp88005439 for perforce@freebsd.org; Sun, 1 Apr 2007 06:37:51 GMT (envelope-from hselasky@FreeBSD.org) Date: Sun, 1 Apr 2007 06:37:51 GMT Message-Id: <200704010637.l316bp88005439@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 117055 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2007 06:37:51 -0000 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 */