From owner-svn-src-all@freebsd.org Mon Aug 29 01:59:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60DDFB77ACF; Mon, 29 Aug 2016 01:59:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33F1A663; Mon, 29 Aug 2016 01:59:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7T1xItL070324; Mon, 29 Aug 2016 01:59:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7T1xI3q070323; Mon, 29 Aug 2016 01:59:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201608290159.u7T1xI3q070323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 29 Aug 2016 01:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304971 - head/sys/dev/mfi 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.22 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: Mon, 29 Aug 2016 01:59:19 -0000 Author: jhb Date: Mon Aug 29 01:59:18 2016 New Revision: 304971 URL: https://svnweb.freebsd.org/changeset/base/304971 Log: Add missing array subscript. This fixes a tautological pointer comparison warning, but would also a real bug for a platform where bus_dmamap_unload of a static allocation is not a no-op. Modified: head/sys/dev/mfi/mfi.c Modified: head/sys/dev/mfi/mfi.c ============================================================================== --- head/sys/dev/mfi/mfi.c Sun Aug 28 21:31:21 2016 (r304970) +++ head/sys/dev/mfi/mfi.c Mon Aug 29 01:59:18 2016 (r304971) @@ -3361,7 +3361,7 @@ out: if (cm->cm_frame->header.cmd == MFI_CMD_STP) { for (i = 0; i < 2; i++) { if (sc->kbuff_arr[i]) { - if (sc->mfi_kbuff_arr_busaddr != 0) + if (sc->mfi_kbuff_arr_busaddr[i] != 0) bus_dmamap_unload( sc->mfi_kbuff_arr_dmat[i], sc->mfi_kbuff_arr_dmamap[i]