diff options
author | Parav Pandit <parav@mellanox.com> | 2019-07-23 09:57:31 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-07-25 12:07:14 -0300 |
commit | a5c9c299d1e1f3c6fb421d73367cc2f793af1a2d (patch) | |
tree | ca4069372ac8008aeeb2b92472d98e23f726429f /drivers/infiniband/hw/mlx5/main.c | |
parent | RDMA/core: Annotate destroy of mutex to ensure that it is released as unlocked (diff) | |
download | linux-dev-a5c9c299d1e1f3c6fb421d73367cc2f793af1a2d.tar.xz linux-dev-a5c9c299d1e1f3c6fb421d73367cc2f793af1a2d.zip |
IB/mlx5: Avoid unnecessary typecast
IB device pointer is already available while deallocating IB device,
Hence do not typecast it.
Link: https://lore.kernel.org/r/20190723065733.4899-9-leon@kernel.org
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index c2a5780cb394..6cdd98ec9c1e 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -6933,7 +6933,7 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) dev->port = kcalloc(num_ports, sizeof(*dev->port), GFP_KERNEL); if (!dev->port) { - ib_dealloc_device((struct ib_device *)dev); + ib_dealloc_device(&dev->ib_dev); return NULL; } |