IB/mlx5: Fix memory leak in query device
authorMajd Dibbiny <majd@mellanox.com>
Thu, 27 Oct 2016 13:36:39 +0000 (16:36 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 17 Nov 2016 01:03:44 +0000 (20:03 -0500)
commit90be7c8ab72853ff9fc407f01518a898df1f3045
treee1c741e4146a24b3601cb87280cbf3b8c3b8c3fd
parent3c7ba5760ab8eedec01159b267bb9bfcffe522ac
IB/mlx5: Fix memory leak in query device

We need to free dev->port when we fail to enable RoCE or
initialize node data.

Fixes: 0837e86a7a34 ('IB/mlx5: Add per port counters')
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c