From f9b50fa1e39b1c3d6eb8fa96541e31f532778b75 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 2 May 2019 00:01:08 +0000 Subject: [PATCH] qla2x00t-32gbit/qla_isr.c: Fix a sparse complaint Avoid that the 'sparse' static checker complains that the ha->msix_entries[] array can be accessed outside its bounds. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8310 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_isr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qla2x00t-32gbit/qla_isr.c b/qla2x00t-32gbit/qla_isr.c index 72631dbcd..66969afeb 100644 --- a/qla2x00t-32gbit/qla_isr.c +++ b/qla2x00t-32gbit/qla_isr.c @@ -3613,7 +3613,8 @@ msix_failed: /* Enable MSI-X vectors for the base queue */ for (i = 0; i < QLA_BASE_VECTORS; i++) { - WARN(i >= ha->msix_count, "%d > %d\n", i, ha->msix_count); + if (WARN(i >= ha->msix_count, "%d > %d\n", i, ha->msix_count)) + break; qentry = &ha->msix_entries[i]; qentry->handle = rsp; rsp->msix = qentry;