aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2025-02-07 09:16:03 +0000
committerLeon Romanovsky <[email protected]>2025-02-09 09:24:06 +0000
commit607a7dcf2e981449a4b200f497f8ea97ddb5e13f (patch)
tree58e1a287b91cca349999ea9d4653f10d10d6562a
parentRDMA/rxe: switch to using the crc32 library (diff)
downloadkernel-607a7dcf2e981449a4b200f497f8ea97ddb5e13f.tar.gz
kernel-607a7dcf2e981449a4b200f497f8ea97ddb5e13f.zip
RDMA/mana_ib: Fix error code in probe()
Return -ENOMEM if dma_pool_create() fails. Don't return success. Fixes: df91c470d9e5 ("RDMA/mana_ib: create/destroy AH") Signed-off-by: Dan Carpenter <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Long Li <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
-rw-r--r--drivers/infiniband/hw/mana/device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mana/device.c b/drivers/infiniband/hw/mana/device.c
index 640a2c96b5ca..0c7a9929168f 100644
--- a/drivers/infiniband/hw/mana/device.c
+++ b/drivers/infiniband/hw/mana/device.c
@@ -151,8 +151,10 @@ static int mana_ib_probe(struct auxiliary_device *adev,
dev->av_pool = dma_pool_create("mana_ib_av", mdev->gdma_context->dev,
MANA_AV_BUFFER_SIZE, MANA_AV_BUFFER_SIZE, 0);
- if (!dev->av_pool)
+ if (!dev->av_pool) {
+ ret = -ENOMEM;
goto destroy_rnic;
+ }
ret = ib_register_device(&dev->ib_dev, "mana_%d",
mdev->gdma_context->dev);