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.
This commit is contained in:
John Baldwin 2016-08-29 01:59:18 +00:00
parent 24f4202df8
commit 27dc50b0f0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=304971

View File

@ -3361,7 +3361,7 @@ mfi_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td
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]