From owner-svn-src-all@FreeBSD.ORG Wed Jan 30 07:48:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CBDB869C; Wed, 30 Jan 2013 07:48:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BA130358; Wed, 30 Jan 2013 07:48:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0U7miAc044631; Wed, 30 Jan 2013 07:48:44 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0U7mihL044630; Wed, 30 Jan 2013 07:48:44 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201301300748.r0U7mihL044630@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 30 Jan 2013 07:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246113 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2013 07:48:44 -0000 Author: hselasky Date: Wed Jan 30 07:48:43 2013 New Revision: 246113 URL: http://svnweb.freebsd.org/changeset/base/246113 Log: Add missing NULL pointer check. Reported by: Lars Engels MFC after: 1 week Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Wed Jan 30 06:37:18 2013 (r246112) +++ head/sys/dev/usb/controller/xhci.c Wed Jan 30 07:48:43 2013 (r246113) @@ -886,6 +886,12 @@ xhci_check_transfer(struct xhci_softc *s * a short packet also makes the transfer done */ if (td->remainder > 0) { + if (td->alt_next == NULL) { + DPRINTF("short TD has no " + "alternate next\n"); + xhci_generic_done(xfer); + break; + } DPRINTF("TD has short pkt\n"); if (xfer->flags_int.short_frames_ok || xfer->flags_int.isochronous_xfr ||