svn commit: r304971 - head/sys/dev/mfi

John Baldwin jhb at FreeBSD.org
Mon Aug 29 01:59:19 UTC 2016


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]


More information about the svn-src-head mailing list