From d0a43c699d9b43aef7fa132069bf29ee1029aec8 Mon Sep 17 00:00:00 2001 From: jhb Date: Mon, 29 Aug 2016 01:59:18 +0000 Subject: [PATCH] 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. --- sys/dev/mfi/mfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index 2bfcc83fdb2a..e1737c030b08 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -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]