RDMA/mlx5: Use correct size for device resources
authorMark Bloch <markb@mellanox.com>
Thu, 28 Mar 2019 13:27:36 +0000 (15:27 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 10 Apr 2019 18:05:39 +0000 (15:05 -0300)
commit5d8f6a0e92070c938f121258841ac36072d17cc3
tree0121cd85d5107cd8d6e2060be70e239f2536f52c
parentda796ccb3e0eba24b15beedb168178c9b74ce6f2
RDMA/mlx5: Use correct size for device resources

On allocation we use the array size and on destruction num_ports, use the
array size of destruction as well, in this context the array corresponds
to the native/actual ports on the NIC so no need to adjust this logic for
representors.

Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c