crypto/dpaa2_sec: fix stats query without queue pair
[dpdk.git] / drivers / crypto / dpaa2_sec / dpaa2_sec_dpseci.c
index 109e61a..f480aaf 100644 (file)
@@ -3501,7 +3501,7 @@ void dpaa2_sec_stats_get(struct rte_cryptodev *dev,
                return;
        }
        for (i = 0; i < dev->data->nb_queue_pairs; i++) {
-               if (qp[i] == NULL) {
+               if (qp == NULL || qp[i] == NULL) {
                        DPAA2_SEC_DEBUG("Uninitialised queue pair");
                        continue;
                }