A caller may/may not pass the flags in qman enqueue multi API. This patch adds a check on that flag and only accesses it if passed by the caller.
Fixes: 43797e7b4774 ("bus/dpaa: support event dequeue and consumption") Cc: sta...@dpdk.org Signed-off-by: Nipun Gupta <nipun.gu...@nxp.com> --- drivers/bus/dpaa/base/qbman/qman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 609bc76..e7fdf03 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -2198,7 +2198,7 @@ int qman_enqueue_multi(struct qman_fq *fq, eq->fd.addr = cpu_to_be40(fd->addr); eq->fd.status = cpu_to_be32(fd->status); eq->fd.opaque = cpu_to_be32(fd->opaque); - if (flags[i] & QMAN_ENQUEUE_FLAG_DCA) { + if (flags && (flags[i] & QMAN_ENQUEUE_FLAG_DCA)) { eq->dca = QM_EQCR_DCA_ENABLE | ((flags[i] >> 8) & QM_EQCR_DCA_IDXMASK); } -- 1.9.1