[PATCH rdma-next 5/5] RDMA/mlx5: Fix wrong free of blue flame register on error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mark Bloch <mbloch@xxxxxxxxxx>

If the allocation of the fast path blue flame register fails, the driver
should free the regular blue flame register.

Fixes: 16c1975f1032 ("IB/mlx5: Create profile infrastructure to add and remove stage")
Reported-by: Hans Petter Selasky <hanss@xxxxxxxxxx>
Signed-off-by: Mark Bloch <mbloch@xxxxxxxxxx>
Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
---
 drivers/infiniband/hw/mlx5/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 84309bcd67d5..427221a13fbc 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -4340,7 +4340,7 @@ static int mlx5_ib_stage_bfrag_init(struct mlx5_ib_dev *dev)

 	err = mlx5_alloc_bfreg(dev->mdev, &dev->fp_bfreg, false, true);
 	if (err)
-		mlx5_free_bfreg(dev->mdev, &dev->fp_bfreg);
+		mlx5_free_bfreg(dev->mdev, &dev->bfreg);

 	return err;
 }
--
2.29.2




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux