Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Aug 2016 01:59:18 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r304971 - head/sys/dev/mfi
Message-ID:  <201608290159.u7T1xI3q070323@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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]



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