From ae69d16b9397b7b9f6b79369db936b1fe498fd0e Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Tue, 31 Mar 2026 20:27:27 -0700 Subject: [PATCH] cndm: Fix some allocation failure handling paths Signed-off-by: Alex Forencich --- src/cndm/modules/cndm/cndm_rq.c | 4 ++-- src/cndm/modules/cndm/cndm_sq.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cndm/modules/cndm/cndm_rq.c b/src/cndm/modules/cndm/cndm_rq.c index 5da1b98..d74af3c 100644 --- a/src/cndm/modules/cndm/cndm_rq.c +++ b/src/cndm/modules/cndm/cndm_rq.c @@ -59,12 +59,12 @@ int cndm_open_rq(struct cndm_ring *rq, struct cndm_priv *priv, struct cndm_cq *c rq->rx_info = kvzalloc(sizeof(*rq->rx_info) * rq->size, GFP_KERNEL); if (!rq->rx_info) - ret = -ENOMEM; + return -ENOMEM; rq->buf_size = rq->size * rq->stride; rq->buf = dma_alloc_coherent(rq->dev, rq->buf_size, &rq->buf_dma_addr, GFP_KERNEL); if (!rq->buf) { - return -ENOMEM; + ret = -ENOMEM; goto fail; } diff --git a/src/cndm/modules/cndm/cndm_sq.c b/src/cndm/modules/cndm/cndm_sq.c index b5de696..11887c4 100644 --- a/src/cndm/modules/cndm/cndm_sq.c +++ b/src/cndm/modules/cndm/cndm_sq.c @@ -59,12 +59,12 @@ int cndm_open_sq(struct cndm_ring *sq, struct cndm_priv *priv, struct cndm_cq *c sq->tx_info = kvzalloc(sizeof(*sq->tx_info) * sq->size, GFP_KERNEL); if (!sq->tx_info) - ret = -ENOMEM; + return -ENOMEM; sq->buf_size = sq->size * sq->stride; sq->buf = dma_alloc_coherent(sq->dev, sq->buf_size, &sq->buf_dma_addr, GFP_KERNEL); if (!sq->buf) { - return -ENOMEM; + ret = -ENOMEM; goto fail; }