nvme: assert that outstanding_tr request is valid

All trackers in outstanding_tr should have a non-NULL request.  Add an
assert to verify this.

Fixes a clang warning during scan-build.

Change-Id: I0ac4d2bad17449f684808cbb98777627d890b65b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-05-16 10:45:40 -07:00
parent 09d3e4c9dd
commit dfc4b030b1

View File

@ -565,6 +565,7 @@ nvme_admin_qpair_abort_aers(struct spdk_nvme_qpair *qpair)
tr = LIST_FIRST(&qpair->outstanding_tr);
while (tr != NULL) {
nvme_assert(tr->req != NULL, ("tr->req == NULL in abort_aers\n"));
if (tr->req->cmd.opc == SPDK_NVME_OPC_ASYNC_EVENT_REQUEST) {
nvme_qpair_manual_complete_tracker(qpair, tr,
SPDK_NVME_SCT_GENERIC, SPDK_NVME_SC_ABORTED_SQ_DELETION, 0,