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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 May 2017 12:27:00 +0000 (14:27 +0200)
commit1ad689bdc12d86f7a3a4c1cce64f88ec53095e85
tree11714f8ea5c9509cb9199c82d92efb92a0b21d29
parent1360f4301c7842854da749db73dd77e67c1c5c5b
IB/mlx4: Fix ib device initialization error flow

commit 99e68909d5aba1861897fe7afc3306c3c81b6de0 upstream.

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")
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx4/main.c