From owner-svn-src-head@FreeBSD.ORG Fri Jan 3 21:38:33 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3D139A3; Fri, 3 Jan 2014 21:38:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BFB9D14C9; Fri, 3 Jan 2014 21:38:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s03LcXAT057358; Fri, 3 Jan 2014 21:38:33 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s03LcX8x057357; Fri, 3 Jan 2014 21:38:33 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201401032138.s03LcX8x057357@svn.freebsd.org> From: Ian Lepore Date: Fri, 3 Jan 2014 21:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260245 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jan 2014 21:38:33 -0000 Author: ian Date: Fri Jan 3 21:38:33 2014 New Revision: 260245 URL: http://svnweb.freebsd.org/changeset/base/260245 Log: Fix a typo that caused a loop to run beyond the end of the array it was searching. If you didn't configure a timer capture pin you'd get a data abort as it wandered into the weeds, now you get a nice warning message about your config, as originally intended. Modified: head/sys/arm/ti/am335x/am335x_dmtimer.c Modified: head/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_dmtimer.c Fri Jan 3 20:47:51 2014 (r260244) +++ head/sys/arm/ti/am335x/am335x_dmtimer.c Fri Jan 3 21:38:33 2014 (r260245) @@ -372,7 +372,7 @@ am335x_dmtimer_pps_init(device_t dev, st * yet from ti_scm.h. */ timer_num = 0; - for (i = 0; nitems(padinfo) && timer_num == 0; ++i) { + for (i = 0; i < nitems(padinfo) && timer_num == 0; ++i) { if (ti_scm_padconf_get(padinfo[i].ballname, &padmux, &padstate) == 0) { if (strcasecmp(padinfo[i].muxname, padmux) == 0 &&