IB/mlx4: Fix ib device initialization error flow
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Tue, 21 Mar 2017 10:57:05 +0000 (12:57 +0200)
committerDoug Ledford <dledford@redhat.com>
Fri, 21 Apr 2017 16:26:05 +0000 (12:26 -0400)
In mlx4_ib_add, procedure mlx4_ib_alloc_eqs is called to allocate EQs.

However, in the mlx4_ib_add error flow, procedure mlx4_ib_free_eqs is not
called to free the allocated EQs.

Fixes: e605b743f33d ("IB/mlx4: Increase the number of vectors (EQs) available for ULPs")
Cc: <stable@vger.kernel.org> # v3.4+
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx4/main.c

index 2cc6f21baea13c67c8a5ea1f938dd336d0c50de0..7a1b345b6aa9d54fc89466ac825fa4056549124a 100644 (file)
@@ -2937,6 +2937,7 @@ err_counter:
                mlx4_ib_delete_counters_table(ibdev, &ibdev->counters_table[i]);
 
 err_map:
+       mlx4_ib_free_eqs(dev, ibdev);
        iounmap(ibdev->uar_map);
 
 err_uar: