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>
This commit is contained in:
parent
56594ae1d2
commit
a5c9c299d1
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue